From dcf5707493f13191eb97bf5f200cc41bc3593f98 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 9 Sep 2017 17:04:17 -0500 Subject: [PATCH] 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. --- code/ui/ui_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index 05d9bbc60a..bd8c515dd0 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -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");