From d2a0db554499d2e1dd54cbbc514a82d054ff0354 Mon Sep 17 00:00:00 2001 From: scamiv <6170744+scamiv@users.noreply.github.com> Date: Tue, 13 Jan 2026 05:15:03 +0100 Subject: [PATCH] triple --- src/client/graphics/layers/TerritoryLayer.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/client/graphics/layers/TerritoryLayer.ts b/src/client/graphics/layers/TerritoryLayer.ts index 340638140..84fc5375f 100644 --- a/src/client/graphics/layers/TerritoryLayer.ts +++ b/src/client/graphics/layers/TerritoryLayer.ts @@ -125,6 +125,15 @@ export class TerritoryLayer implements Layer { this.tickTimeMsPrev = this.tickTimeMsCurrent; this.tickTimeMsCurrent = now; + // Keep interpolation continuous across variable tick rates by rendering ~one tick "behind". + // With a fixed 100ms delay, slow tick rates (e.g. 0.5x) reach progress=1 early and then + // plateau until the next tick, which looks like motion stops. + const lastInterval = this.tickTimeMsCurrent - this.tickTimeMsPrev; + if (lastInterval > 0) { + // Clamp to avoid extreme latency or instability if tick timing spikes. + this.interpolationDelayMs = Math.max(50, Math.min(1500, lastInterval)); + } + if (this.territoryRenderer) { this.tickSnapshotPending = true; }