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
This commit is contained in:
DevelopingTom
2025-10-09 23:44:17 +02:00
committed by GitHub
parent 0076996dce
commit fc38fed972
+1 -1
View File
@@ -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) {