Skip to content
Permalink
Browse files

ui: fixed double menu after disconnecting in localhost

Pressing Esc key twice after disconnecting would display
the in game menu, because CA_DISCONNECT was not set correctly
and the UI thought it was still ingame.
  • Loading branch information
rmarquis committed Jan 8, 2020
1 parent 642c92e commit 492e3f53f96a37aac9e8e384292e21d51074d6d9
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/ui/ui_main.c
@@ -4689,14 +4689,12 @@ void UI_RunMenuScript(char **args)
{
trap_Cvar_Set("sv_killserver", "1");
}
else
{
trap_Cmd_ExecuteText(EXEC_APPEND, "disconnect\n");
trap_Key_SetCatcher(KEYCATCH_UI);
Menus_CloseAll();
Menus_ActivateByName("backgroundmusic", qtrue);
Menus_ActivateByName("main_opener", qtrue);
}

trap_Cmd_ExecuteText(EXEC_APPEND, "disconnect\n");
trap_Key_SetCatcher(KEYCATCH_UI);
Menus_CloseAll();
Menus_ActivateByName("backgroundmusic", qtrue);
Menus_ActivateByName("main_opener", qtrue);
}
else if (Q_stricmp(name, "ServerSort") == 0)
{

0 comments on commit 492e3f5

Please sign in to comment.
You can’t perform that action at this time.