fix issue where other player leaving messed it up

This commit is contained in:
RandomityGuy 2024-06-03 22:36:50 +05:30
parent 3798b8f65b
commit 3c30599910

View file

@ -213,7 +213,7 @@ class NetCommands {
var allReady = true; var allReady = true;
for (id => client in Net.clientIdMap) { for (id => client in Net.clientIdMap) {
if (client.state != GameplayState.GAME) { if (client.state != GameplayState.GAME && client != conn) {
allReady = false; allReady = false;
break; break;
} }
@ -222,7 +222,6 @@ class NetCommands {
MarbleGame.instance.world.allClientsReady(); MarbleGame.instance.world.allClientsReady();
} }
} }
Net.clientIdMap.remove(clientId);
if (MarbleGame.canvas.content is MultiplayerLevelSelectGui) { if (MarbleGame.canvas.content is MultiplayerLevelSelectGui) {
cast(MarbleGame.canvas.content, MultiplayerLevelSelectGui).updateLobbyNames(); cast(MarbleGame.canvas.content, MultiplayerLevelSelectGui).updateLobbyNames();
} }