diff --git a/source/src/clients2c.cpp b/source/src/clients2c.cpp index 02c76855..156f4dd5 100644 --- a/source/src/clients2c.cpp +++ b/source/src/clients2c.cpp @@ -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(); diff --git a/source/src/menus.cpp b/source/src/menus.cpp index 922bb175..8f6db8fa 100644 --- a/source/src/menus.cpp +++ b/source/src/menus.cpp @@ -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)