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:
parent
213b15a9db
commit
dcf5707493
1 changed files with 1 additions and 1 deletions
|
@ -3263,7 +3263,6 @@ static void UI_RunMenuScript(char **args) {
|
||||||
trap_Cvar_Set("ui_cdkeyvalid", "CD Key does not appear to be valid.");
|
trap_Cvar_Set("ui_cdkeyvalid", "CD Key does not appear to be valid.");
|
||||||
}
|
}
|
||||||
} else if (Q_stricmp(name, "loadArenas") == 0) {
|
} else if (Q_stricmp(name, "loadArenas") == 0) {
|
||||||
UI_LoadArenas();
|
|
||||||
UI_MapCountByGameType(qfalse);
|
UI_MapCountByGameType(qfalse);
|
||||||
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver");
|
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "createserver");
|
||||||
} else if (Q_stricmp(name, "saveControls") == 0) {
|
} else if (Q_stricmp(name, "saveControls") == 0) {
|
||||||
|
@ -5165,6 +5164,7 @@ void _UI_Init( qboolean inGameLoad ) {
|
||||||
UI_ParseTeamInfo("teaminfo.txt");
|
UI_ParseTeamInfo("teaminfo.txt");
|
||||||
UI_LoadTeams();
|
UI_LoadTeams();
|
||||||
UI_ParseGameInfo("gameinfo.txt");
|
UI_ParseGameInfo("gameinfo.txt");
|
||||||
|
UI_LoadArenas();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
menuSet = UI_Cvar_VariableString("ui_menuFiles");
|
menuSet = UI_Cvar_VariableString("ui_menuFiles");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue