Skip to content

Commit

Permalink
FFA/Multi: Fix simultaneous timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
MathyFurret committed Jul 29, 2024
1 parent 61e9be5 commit 79c23a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/room-battle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ export class RoomBattleTimer {
}
let didSomething = false;
for (const player of players) {
if (!player.id) continue; // already eliminated, relevant for FFA gamesif it
if (!player.id) continue; // already eliminated in 4-player
if (player.turnSecondsLeft > 0) continue;
if (this.settings.timeoutAutoChoose && player.secondsLeft > 0 && player.knownActive) {
void this.battle.stream.write(`>${player.slot} default`);
didSomething = true;
} else {
this.battle.forfeitPlayer(player, ' lost due to inactivity.');
return true;
didSomething = true;
}
}
return didSomething;
Expand Down

0 comments on commit 79c23a4

Please sign in to comment.