close all menus at arena round start

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3988 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2008-12-11 15:01:27 +00:00
parent 7d3af07b07
commit ba2cf52644
2 changed files with 14 additions and 1 deletions
+1
View File
@@ -372,6 +372,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
arenaintermission = 0;
if(m_arena)
{
closemenu(NULL);
conoutf("new round starting... fight!");
hudeditf(HUDMSG_TIMER, "FIGHT!");
if(m_botmode) BotManager.RespawnBots();
+13 -1
View File
@@ -40,7 +40,19 @@ void showmenu(const char *name, bool top)
void closemenu(const char *name)
{
gmenu *m = menus.access(name);
gmenu *m;
if(!name)
{
if(curmenu) curmenu->close();
while(!menustack.empty())
{
m = menustack.pop();
if(m) m->close();
}
curmenu = NULL;
return;
}
m = menus.access(name);
if(!m) return;
if(curmenu==m) menuset(menustack.empty() ? NULL : menustack.pop(), false);
else loopv(menustack)