Don't reload arenas.txt/*.arena files in Team Arena UI

Entering Team Arena's start server or in-game callvote menu causes
arenas to be reloaded. The existing memory is not freed so after
a entering the menus a few times the UI runs out of memory and
crashes.

Just load arenas once when the UI loads like in q3_ui.
This commit is contained in:
Zack Middleton 2017-09-09 17:04:17 -05:00
parent 213b15a9db
commit dcf5707493
1 changed files with 1 additions and 1 deletions

View File

@ -3263,7 +3263,6 @@ 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_LoadArenas();
UI_MapCountByGameType(qfalse);
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver");
} else if (Q_stricmp(name, "saveControls") == 0) {
@ -5165,6 +5164,7 @@ void _UI_Init( qboolean inGameLoad ) {
UI_ParseTeamInfo("teaminfo.txt");
UI_LoadTeams();
UI_ParseGameInfo("gameinfo.txt");
UI_LoadArenas();
#endif
menuSet = UI_Cvar_VariableString("ui_menuFiles");