Fix one too many player count on dedicated servers

This commit is contained in:
Gustaf Alhäll 2023-12-28 21:52:48 +01:00
parent c2a8d1f7ea
commit 849455bba7
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD

View file

@ -109,7 +109,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
netbuffer->u.serverinfo.leveltime = (tic_t)LONG(leveltime); netbuffer->u.serverinfo.leveltime = (tic_t)LONG(leveltime);
// Exclude bots from both counts // Exclude bots from both counts
netbuffer->u.serverinfo.numberofplayer = (UINT8)D_NumNodes(); netbuffer->u.serverinfo.numberofplayer = (UINT8)(D_NumNodes() - (dedicated ? 1 : 0));
netbuffer->u.serverinfo.maxplayer = (UINT8)(cv_maxplayers.value - D_NumBots()); netbuffer->u.serverinfo.maxplayer = (UINT8)(cv_maxplayers.value - D_NumBots());
netbuffer->u.serverinfo.refusereason = GetRefuseReason(node); netbuffer->u.serverinfo.refusereason = GetRefuseReason(node);