From d721051b549269e3b4cdfa82846facbb1b2272bd Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 31 Jul 2006 22:00:04 +0000 Subject: * Reconnect dialog upon server disconnect (bug #2805 tjw) --- src/qcommon/common.c | 1 + src/ui/ui_main.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/qcommon/common.c b/src/qcommon/common.c index a33eb6fd..cc105ee8 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -255,6 +255,7 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { } } #endif + Cvar_Set("com_errorCode", va("%i", code)); // when we are running automated scripts, make sure we // know if anything failed diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 735d0b62..b323322e 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -5587,7 +5587,10 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) { trap_Cvar_VariableStringBuffer("com_errorMessage", buf, sizeof(buf)); if (strlen(buf)) { if (!ui_singlePlayerActive.integer) { - Menus_ActivateByName("error_popmenu"); + if( trap_Cvar_VariableValue( "com_errorCode" ) == ERR_SERVERDISCONNECT ) + Menus_ActivateByName("drop_popmenu"); + else + Menus_ActivateByName("error_popmenu"); } else { trap_Cvar_Set("com_errorMessage", ""); } -- cgit