[ioquake3] 94/136: Only auto update empty Team Arena internet server cache

Simon McVittie smcv at debian.org
Thu Jun 15 09:09:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository ioquake3.

commit 5592342b1b452f78a6d7dc82c73f9ac2a16a7093
Author: Zack Middleton <zack at cloemail.com>
Date:   Sat Jun 3 11:45:11 2017 -0500

    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 f064932..bb43ec4 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
 		}
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list