mirror of
https://github.com/AlecM33/Werewolf.git
synced 2026-02-10 04:03:33 +01:00
Reset timerParams.ended flag when restarting game
- Added reset of ended flag to false in restartGame function - Ensures restarted games don't have timer marked as already ended - Placed right after timer cleanup for logical grouping Co-authored-by: AlecM33 <24642328+AlecM33@users.noreply.github.com>
This commit is contained in:
@@ -272,6 +272,10 @@ class GameManager {
|
||||
delete this.timers[game.accessCode];
|
||||
}
|
||||
|
||||
if (game.timerParams) {
|
||||
game.timerParams.ended = false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < game.people.length; i ++) {
|
||||
if (game.people[i].userType === USER_TYPES.KILLED_PLAYER) {
|
||||
game.people[i].userType = USER_TYPES.PLAYER;
|
||||
|
||||
Reference in New Issue
Block a user