From fc38fed97246230e3c475a293f31d63ca2712c3c Mon Sep 17 00:00:00 2001 From: DevelopingTom Date: Thu, 9 Oct 2025 23:44:17 +0200 Subject: [PATCH] Fix target FX on retreating units (#2166) ## Description: Retreating naval invasions spams the target FX each frames. Changes: filter out retreating invasions. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: IngloriousTom --- src/client/graphics/layers/FxLayer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/graphics/layers/FxLayer.ts b/src/client/graphics/layers/FxLayer.ts index dbd433347..027b8dd6c 100644 --- a/src/client/graphics/layers/FxLayer.ts +++ b/src/client/graphics/layers/FxLayer.ts @@ -122,7 +122,7 @@ export class FxLayer implements Layer { const my = this.game.myPlayer(); if (!my) return; if (unit.owner() !== my) return; - if (!unit.isActive()) return; + if (!unit.isActive() || unit.retreating()) return; if (this.boatTargetFxByUnitId.has(unit.id())) return; const t = unit.targetTile(); if (t !== undefined) {