Skip to content

Commit

Permalink
Fix favorite servers player count message in Team Arena UI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Jun 1, 2017
1 parent 6b5674e commit 2091a2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/ui/ui_main.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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++;
}
}
Expand Down

0 comments on commit 2091a2e

Please sign in to comment.