From 5592342b1b452f78a6d7dc82c73f9ac2a16a7093 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 3 Jun 2017 11:45:11 -0500 Subject: [PATCH] Only auto update empty Team Arena internet server cache Previously tested a mod cvar which may be wrong when multiple mods are involved or config is reset. Let's check the server cache's internet server count directly. --- code/ui/ui_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index f0649328..bb43ec44 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -5982,11 +5982,10 @@ static void UI_StartServerRefresh(qboolean full, qboolean force) // This function is called with force=qfalse when server browser menu opens or net source changes. // Automatically update local and favorite servers. - // Only update master server list the first time because the server info cache will be available after that. + // Only auto update master server list if there is no server info cache. if ( !force && ( ui_netSource.integer >= UIAS_GLOBAL1 && ui_netSource.integer <= UIAS_GLOBAL5 ) ) { - char *value = UI_Cvar_VariableString( va( "ui_lastServerRefresh_%i", ui_netSource.integer ) ); - if ( value[0] != 0 ) { - return; // should have cached list + if ( trap_LAN_GetServerCount( UI_SourceForLAN() ) > 0 ) { + return; // have cached list } }