mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix that sometimes 64 player servers show up as 16 player
This commit is contained in:
parent
ab2563c2b5
commit
ba9a29c704
|
@ -1008,6 +1008,11 @@ void CClient::ProcessConnlessPacket(CNetChunk *pPacket)
|
||||||
CUnpacker Up;
|
CUnpacker Up;
|
||||||
CServerInfo Info = {0};
|
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));
|
Up.Reset((unsigned char*)pPacket->m_pData+sizeof(SERVERBROWSE_INFO), pPacket->m_DataSize-sizeof(SERVERBROWSE_INFO));
|
||||||
int Token = str_toint(Up.GetString());
|
int Token = str_toint(Up.GetString());
|
||||||
str_copy(Info.m_aVersion, Up.GetString(CUnpacker::SANITIZE_CC|CUnpacker::SKIP_START_WHITESPACES), sizeof(Info.m_aVersion));
|
str_copy(Info.m_aVersion, Up.GetString(CUnpacker::SANITIZE_CC|CUnpacker::SKIP_START_WHITESPACES), sizeof(Info.m_aVersion));
|
||||||
|
|
Loading…
Reference in a new issue