mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:00:54 +00:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user