mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-26 11:10:55 +00:00
Merge branch 'fix-splitscreen-join' into 'master'
Prevent more local players than the server maxplayers limit joining Closes #30 See merge request KartKrew/Kart!90
This commit is contained in:
commit
f17f5d08f5
1 changed files with 2 additions and 0 deletions
|
@ -3516,6 +3516,8 @@ static void HandleConnect(SINT8 node)
|
|||
SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment"));
|
||||
else if (D_NumPlayers() >= cv_maxplayers.value)
|
||||
SV_SendRefuse(node, va(M_GetText("Maximum players reached: %d"), cv_maxplayers.value));
|
||||
else if (netgame && D_NumPlayers() + netbuffer->u.clientcfg.localplayers > cv_maxplayers.value)
|
||||
SV_SendRefuse(node, va(M_GetText("Number of local players\nwould exceed maximum: %d"), cv_maxplayers.value));
|
||||
else if (netgame && netbuffer->u.clientcfg.localplayers > 4) // Hacked client?
|
||||
SV_SendRefuse(node, M_GetText("Too many players from\nthis node."));
|
||||
else if (netgame && !netbuffer->u.clientcfg.localplayers) // Stealth join?
|
||||
|
|
Loading…
Reference in a new issue