diff --git a/code/ui/ui_gameinfo.c b/code/ui/ui_gameinfo.c index 557dee23..0721f8b2 100644 --- a/code/ui/ui_gameinfo.c +++ b/code/ui/ui_gameinfo.c @@ -138,12 +138,10 @@ void UI_LoadArenas( void ) { char filename[128]; char dirlist[1024]; char* dirptr; - int i, n; + int i; int dirlen; - char *type; ui_numArenas = 0; - uiInfo.mapCount = 0; trap_Cvar_Register( &arenasFile, "g_arenasFile", "", CVAR_INIT|CVAR_ROM ); if( *arenasFile.string ) { @@ -166,6 +164,18 @@ void UI_LoadArenas( void ) { if (UI_OutOfMemory()) { trap_Print(S_COLOR_YELLOW"WARNING: not enough memory in pool to load all arenas\n"); } +} + +/* +=============== +UI_LoadArenasIntoMapList +=============== +*/ +void UI_LoadArenasIntoMapList( void ) { + int n; + char *type; + + uiInfo.mapCount = 0; for( n = 0; n < ui_numArenas; n++ ) { // determine type diff --git a/code/ui/ui_local.h b/code/ui/ui_local.h index 9129aee9..ae181823 100644 --- a/code/ui/ui_local.h +++ b/code/ui/ui_local.h @@ -359,6 +359,7 @@ int UI_AdjustTimeByGame(int time); void UI_ShowPostGame(qboolean newHigh); void UI_ClearScores( void ); void UI_LoadArenas(void); +void UI_LoadArenasIntoMapList(void); // // ui_menu.c diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 66e897c3..f83de0be 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -3268,6 +3268,7 @@ static void UI_RunMenuScript(char **args) { trap_Cvar_Set("ui_cdkeyvalid", "CD Key does not appear to be valid."); } } else if (Q_stricmp(name, "loadArenas") == 0) { + UI_LoadArenasIntoMapList(); UI_MapCountByGameType(qfalse); Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver"); } else if (Q_stricmp(name, "saveControls") == 0) {