From ba9a29c704f88fca778890face12826cf0189daa Mon Sep 17 00:00:00 2001 From: def Date: Thu, 9 Jan 2014 15:40:11 +0100 Subject: [PATCH] Fix that sometimes 64 player servers show up as 16 player --- src/engine/client/client.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 6cdf26563..f22afb7ff 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1008,6 +1008,11 @@ void CClient::ProcessConnlessPacket(CNetChunk *pPacket) CUnpacker Up; CServerInfo Info = {0}; + CServerBrowser::CServerEntry *pEntry = m_ServerBrowser.Find(pPacket->m_Address); + // Don't add info if we already got info64 + if(pEntry->m_Info.m_MaxClients > VANILLA_MAX_CLIENTS) + return; + Up.Reset((unsigned char*)pPacket->m_pData+sizeof(SERVERBROWSE_INFO), pPacket->m_DataSize-sizeof(SERVERBROWSE_INFO)); int Token = str_toint(Up.GetString()); str_copy(Info.m_aVersion, Up.GetString(CUnpacker::SANITIZE_CC|CUnpacker::SKIP_START_WHITESPACES), sizeof(Info.m_aVersion));