mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
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.
This commit is contained in:
parent
8c3d1fcf59
commit
cbd9e432b5
1 changed files with 6 additions and 38 deletions
|
@ -717,38 +717,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
|
||||
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue