From f312748879ff1aaf5c3d3f3b1dc2606f9990b602 Mon Sep 17 00:00:00 2001 From: Molgrum Date: Fri, 22 Feb 2008 22:57:28 +0000 Subject: [PATCH] Close the menu when a demo is selected. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2932 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/m_single.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/client/m_single.c b/engine/client/m_single.c index 029ce6f46..4780e070d 100644 --- a/engine/client/m_single.c +++ b/engine/client/m_single.c @@ -364,6 +364,7 @@ static qboolean M_DemoKey(menucustom_t *control, menu_t *menu, int key) ShowDemoMenu(menu, va("%s", info->selected->name)); else { + extern m_state_t m_state; int extnum; for (extnum = 0; extnum < info->numext; extnum++) if (!stricmp(info->selected->name + strlen(info->selected->name)-4, info->ext[extnum])) @@ -373,6 +374,8 @@ static qboolean M_DemoKey(menucustom_t *control, menu_t *menu, int key) extnum = 0; Cbuf_AddText(va("%s \"%s\"\n", info->command[extnum], info->selected->name), RESTRICT_LOCAL); + m_state = m_none; + } } return true;