mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-29 01:07:50 +01:00
fix bug with transferring mod powers to spectators that join after game is started
This commit is contained in:
@@ -157,6 +157,10 @@ function setClientSocketHandlers (stateBucket, gameStateRenderer, socket, timerW
|
||||
}
|
||||
});
|
||||
|
||||
socket.on(globals.EVENTS.NEW_SPECTATOR, (spectator) => {
|
||||
stateBucket.currentGameState.spectators.push(spectator);
|
||||
});
|
||||
|
||||
socket.on(globals.EVENTS.PLAYER_LEFT, (player) => {
|
||||
removeStartGameFunctionalityIfPresent(gameStateRenderer);
|
||||
toast(player.name + ' has left!', 'error', false, true, 3);
|
||||
|
||||
Reference in New Issue
Block a user