[ioquake3] 27/50: Fix nonresponsive favorites in q3_ui having no hostname
Simon McVittie
smcv at debian.org
Sun Jul 23 21:55:24 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 cbd9e432b58477d45bbce3d027ad2c8c05e492e3
Author: Zack Middleton <zack at cloemail.com>
Date: Sat Jul 1 14:10:46 2017 -0500
Fix nonresponsive favorites in q3_ui having no hostname
ArenaServers_InsertFavorites() fails to do anything because favorites
are added to the server list even if nonresponsive.
Set nonresponsive favorite server hostname to address.
---
code/q3_ui/ui_servers2.c | 44 ++++++--------------------------------------
1 file changed, 6 insertions(+), 38 deletions(-)
diff --git a/code/q3_ui/ui_servers2.c b/code/q3_ui/ui_servers2.c
index 73e41b6..4830805 100644
--- a/code/q3_ui/ui_servers2.c
+++ b/code/q3_ui/ui_servers2.c
@@ -719,38 +719,6 @@ static void ArenaServers_Insert( char* adrstr, char* info, int pingtime )
/*
=================
-ArenaServers_InsertFavorites
-
-Insert nonresponsive address book entries into display lists.
-=================
-*/
-void ArenaServers_InsertFavorites( void )
-{
- int i;
- int j;
- char info[MAX_INFO_STRING];
-
- // resync existing results with new or deleted cvars
- info[0] = '\0';
- Info_SetValueForKey( info, "hostname", "No Response" );
- for (i=0; i<g_arenaservers.numfavoriteaddresses; i++)
- {
- // find favorite address in refresh list
- for (j=0; j<g_numfavoriteservers; j++)
- if (!Q_stricmp(g_arenaservers.favoriteaddresses[i],g_favoriteserverlist[j].adrstr))
- break;
-
- if ( j >= g_numfavoriteservers)
- {
- // not in list, add it
- ArenaServers_Insert( g_arenaservers.favoriteaddresses[i], info, ArenaServers_MaxPing() );
- }
- }
-}
-
-
-/*
-=================
ArenaServers_LoadFavorites
Load cvar address book entries into local lists.
@@ -832,12 +800,6 @@ static void ArenaServers_StopRefresh( void )
g_arenaservers.refreshservers = qfalse;
- if (g_servertype == UIAS_FAVORITES)
- {
- // nonresponsive favorites must be shown
- ArenaServers_InsertFavorites();
- }
-
// final tally
if (g_arenaservers.numqueriedservers >= 0)
{
@@ -931,6 +893,12 @@ static void ArenaServers_DoRefresh( void )
// stale it out
info[0] = '\0';
time = maxPing;
+
+ // set hostname for nonresponsive favorite server
+ if (g_servertype == UIAS_FAVORITES) {
+ Info_SetValueForKey( info, "hostname", adrstr );
+ Info_SetValueForKey( info, "game", "???" );
+ }
}
else
{
--
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