mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 13:40:56 +00:00
Fix hitch when opening Team Arena find friend menu
Opening the find friend menu in the Team Arena server browser hitches due to trying to resolve blank host names. In UI_BuildFindPlayerList() status requests that are initial or completed state or have timed out get reset. This means it starts with MAX_SERVERSTATUSREQUESTS (16) blank host names. So just ignore them in UI_GetServerStatusInfo().
This commit is contained in:
parent
0a19ae0306
commit
bd067540f5
1 changed files with 11 additions and 1 deletions
|
@ -3920,11 +3920,21 @@ static int UI_GetServerStatusInfo( const char *serverAddress, serverStatusInfo_t
|
|||
char *p, *score, *ping, *name;
|
||||
int i, len;
|
||||
|
||||
if (info) {
|
||||
memset(info, 0, sizeof(*info));
|
||||
}
|
||||
|
||||
// ignore initial unset addresses
|
||||
if (serverAddress && *serverAddress == '\0') {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// reset server status request for this address
|
||||
if (!info) {
|
||||
trap_LAN_ServerStatus( serverAddress, NULL, 0);
|
||||
return qfalse;
|
||||
}
|
||||
memset(info, 0, sizeof(*info));
|
||||
|
||||
if ( trap_LAN_ServerStatus( serverAddress, info->text, sizeof(info->text)) ) {
|
||||
Q_strncpyz(info->address, serverAddress, sizeof(info->address));
|
||||
p = info->text;
|
||||
|
|
Loading…
Reference in a new issue