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:
copilot-swe-agent[bot]
2026-01-24 16:30:06 +00:00
parent c466779085
commit c91e9292f0

View File

@@ -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;