Invitations changes.

Now require confirmation from both side to start game.
This commit is contained in:
LuckyLaszlo
2023-01-15 19:02:16 +01:00
parent a2b2168884
commit e3407b8a9d
4 changed files with 34 additions and 49 deletions

View File

@@ -107,6 +107,7 @@ async function clientAnnounceListener(this: WebSocket, data: string)
console.log("catch /game/gameserver/validate: ", error);
this.send(JSON.stringify( new ev.EventError("validate token error") ));
clientTerminate(clientsMap.get(this.id));
return;
});
player.matchOptions = announce.matchOptions;
@@ -350,6 +351,7 @@ async function playerReadyConfirmationListener(this: WebSocket, data: string)
client.gameSession = null;
clientTerminate(client);
});
return;
});
gameSession.playersMap.forEach( (client) => {