fix(game): fix kickPlayer event to include gameId and improve reset message on player kick

This commit is contained in:
Ralex
2025-10-26 11:32:01 +01:00
parent ba29466c69
commit 2e645ae9d5
7 changed files with 18 additions and 15 deletions

View File

@@ -158,7 +158,9 @@ class Game {
this.playerStatus.delete(playerId)
this.io.in(playerId).socketsLeave(this.gameId)
this.io.to(player.id).emit("game:kick")
this.io
.to(player.id)
.emit("game:reset", "You have been kicked by the manager")
this.io.to(this.manager.id).emit("manager:playerKicked", player.id)
this.io.to(this.gameId).emit("game:totalPlayers", this.players.length)