Fix being able to join direct connection lobbies past max players

This commit is contained in:
Agent X 2024-06-21 17:33:32 -04:00
parent 270244d02d
commit ef43b197d0
1 changed files with 1 additions and 0 deletions

View File

@ -80,6 +80,7 @@ void network_send_join(struct Packet* joinRequestPacket) {
u8 globalIndex = joinRequestPacket->localIndex;
if (globalIndex == UNKNOWN_LOCAL_INDEX) {
for (u32 i = 1; i < MAX_PLAYERS; i++) {
if (i >= gServerSettings.maxPlayers) { break; }
if (!gNetworkPlayers[i].connected) {
globalIndex = i;
break;