diff --git a/src/client/hud/layers/GameRightSidebar.ts b/src/client/hud/layers/GameRightSidebar.ts index 88472d718..12bc818fe 100644 --- a/src/client/hud/layers/GameRightSidebar.ts +++ b/src/client/hud/layers/GameRightSidebar.ts @@ -112,6 +112,16 @@ export class GameRightSidebar extends LitElement implements Controller { } if (this.game.inSpawnPhase()) { + // Singleplayer has no spawn timer (SpawnTimerExecution isn't added), so + // the spawn phase doesn't count down — keep the old static display. + if (this.game.config().gameConfig().gameType === GameType.Singleplayer) { + const maxTimerValue = this.game.config().gameConfig().maxTimerValue; + this.timer = + maxTimerValue !== null && maxTimerValue !== undefined + ? maxTimerValue * 60 + : 0; + return; + } const spawnPhaseDurationTicks = this.game.config().numSpawnPhaseTurns(); const currentTicks = this.game.ticks(); const remainingTicks = spawnPhaseDurationTicks - currentTicks;