mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:30:43 +00:00
475a7ab8af
The renderer kept a parallel CONSTRUCTION_DURATIONS table in src/client/render/GameConstants.ts that had drifted from Config: port showed as 20 ticks but the simulation builds it in 50, so the bar hit 100% and idled for 30 ticks. SAM/silo cooldown constants were also stale (120/75 vs Config's 90/90), making the missile-readiness bar slightly wrong too. Delete GameConstants.ts entirely. Thread the Config instance through WebGLGameView → GPURenderer → BarPass / FxPass / FxSpritePass / WorldTextPass; passes call config.unitInfo(...).constructionDuration, config.SAMCooldown(), config.deletionMarkDuration(), config.msPerTick() directly. Add Config.msPerTick() since no method existed for it. Move the visual-only NUKE_EXPLOSION_RADII (not a game-logic value) into FxSpritePass where it's used.