Fix favorite servers player count message in Team Arena UI

The console message "1 servers listed in browser with 2 players."
would count clients multiple times when viewing favorite servers.

When viewing favorite servers in Team Arena UI, servers are added
to list before getting ping response. Each time UI checked pings
and inserted server it incremented the player count.
This commit is contained in:
Zack Middleton 2017-06-01 16:31:17 -05:00
parent 6b5674e6bb
commit 2091a2e2d5
1 changed files with 1 additions and 1 deletions

View File

@ -3791,7 +3791,6 @@ static void UI_BuildServerDisplayList(int force) {
trap_LAN_GetServerInfo(lanSource, i, info, MAX_STRING_CHARS);
clients = atoi(Info_ValueForKey(info, "clients"));
uiInfo.serverStatus.numPlayersOnServers += clients;
if (ui_browserShowEmpty.integer == 0) {
if (clients == 0) {
@ -3835,6 +3834,7 @@ static void UI_BuildServerDisplayList(int force) {
// done with this server
if (ping > 0) {
trap_LAN_MarkServerVisible(lanSource, i, qfalse);
uiInfo.serverStatus.numPlayersOnServers += clients;
numinvisible++;
}
}