[iortcw] 91/95: All: Only auto update empty internet server cache
Simon McVittie
smcv at debian.org
Fri Sep 8 10:42:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to tag 1.51
in repository iortcw.
commit b510b46ce8dcd4b8094fd6b300f1e9ad3816e0f1
Author: MAN-AT-ARMS <M4N4T4RMS at gmail.com>
Date: Sun Jun 4 07:24:27 2017 -0400
All: Only auto update empty internet server cache
Unused in SP
---
MP/code/ui/ui_main.c | 7 +++----
SP/code/ui/ui_main.c | 7 +++----
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/MP/code/ui/ui_main.c b/MP/code/ui/ui_main.c
index 0e3f299..b496e34 100644
--- a/MP/code/ui/ui_main.c
+++ b/MP/code/ui/ui_main.c
@@ -7919,11 +7919,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
}
}
diff --git a/SP/code/ui/ui_main.c b/SP/code/ui/ui_main.c
index bd957bd..521e2c6 100644
--- a/SP/code/ui/ui_main.c
+++ b/SP/code/ui/ui_main.c
@@ -7707,11 +7707,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/iortcw.git
More information about the Pkg-games-commits
mailing list