From 2091a2e2d5f6e88bded029d4d1b93ea2b712f37d Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 1 Jun 2017 16:31:17 -0500 Subject: [PATCH] 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. --- code/ui/ui_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index d2370f6c..578d33de 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -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++; } }