mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Respect reserved slots in old serverinfo
Noticed in https://github.com/ddnet/ddnet/pull/5850 that reserved slots were not respected
This commit is contained in:
parent
62a95416c3
commit
fa80b157aa
|
@ -1886,7 +1886,8 @@ void CServer::CacheServerInfo(CCache *pCache, int Type, bool SendClients)
|
|||
}
|
||||
else
|
||||
{
|
||||
str_format(aBuf, sizeof(aBuf), "%s [%d/%d]", Config()->m_SvName, ClientCount, m_NetServer.MaxClients());
|
||||
const int MaxClients = maximum(ClientCount, m_NetServer.MaxClients() - Config()->m_SvReservedSlots);
|
||||
str_format(aBuf, sizeof(aBuf), "%s [%d/%d]", Config()->m_SvName, ClientCount, MaxClients);
|
||||
p.AddString(aBuf, 64);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue