Skip to content

Commit

Permalink
Only auto update empty Team Arena internet server cache
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Jun 3, 2017
1 parent 66fec1b commit 5592342
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/ui/ui_main.c
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 5592342

Please sign in to comment.