From cf3092293270629dc6937b866799094f861ac35a Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 30 Sep 2012 06:21:08 +0000 Subject: [PATCH] Fix resetting single player level selection in q3_ui when there is no training level, such as in demoq3. --- code/q3_ui/ui_splevel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/q3_ui/ui_splevel.c b/code/q3_ui/ui_splevel.c index 17c9456c..e9898665 100644 --- a/code/q3_ui/ui_splevel.c +++ b/code/q3_ui/ui_splevel.c @@ -368,7 +368,11 @@ static void UI_SPLevelMenu_ResetAction( qboolean result ) { // clear game variables UI_NewGame(); - trap_Cvar_SetValue( "ui_spSelection", -4 ); + if ( UI_GetSpecialArenaInfo( "training" ) ) { + trap_Cvar_SetValue( "ui_spSelection", -4 ); + } else { + trap_Cvar_SetValue( "ui_spSelection", 0 ); + } // make the level select menu re-initialize UI_PopMenu();