mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-16 19:50:03 +00:00
Merge branch 'main' into lobby
This commit is contained in:
@@ -329,6 +329,7 @@ export class ClientGameRunner {
|
||||
this.saveGame(gu.updates[GameUpdateType.Win][0]);
|
||||
}
|
||||
});
|
||||
|
||||
const worker = this.worker;
|
||||
const keepWorkerAlive = () => {
|
||||
if (this.isActive) {
|
||||
@@ -433,7 +434,17 @@ export class ClientGameRunner {
|
||||
`got wrong turn have turns ${this.turnsSeen}, received turn ${message.turn.turnNumber}`,
|
||||
);
|
||||
} else {
|
||||
this.worker.sendTurn(message.turn);
|
||||
this.worker.sendTurn(
|
||||
// Filter out pause intents in replays
|
||||
this.gameView.config().isReplay()
|
||||
? {
|
||||
...message.turn,
|
||||
intents: message.turn.intents.filter(
|
||||
(i) => i.type !== "toggle_pause",
|
||||
),
|
||||
}
|
||||
: message.turn,
|
||||
);
|
||||
this.turnsSeen++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user