From 843aa11c847565d592ada02d3121c5ec8125d9a8 Mon Sep 17 00:00:00 2001 From: Vivacious Box Date: Sat, 11 Oct 2025 19:05:23 +0200 Subject: [PATCH] Fix the ghost unit turning green when hovering an ennemy structure (#2175) ## Description: Fix the ghost unit turning green when hovering an ennemy structure ## 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: DISCORD_USERNAME --- src/client/graphics/layers/StructureIconsLayer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/graphics/layers/StructureIconsLayer.ts b/src/client/graphics/layers/StructureIconsLayer.ts index a2e41c4fa..df6634461 100644 --- a/src/client/graphics/layers/StructureIconsLayer.ts +++ b/src/client/graphics/layers/StructureIconsLayer.ts @@ -277,7 +277,9 @@ export class StructureIconsLayer implements Layer { if (unit.canUpgrade) { this.potentialUpgrade = this.renders.find( - (r) => r.unit.id() === unit.canUpgrade, + (r) => + r.unit.id() === unit.canUpgrade && + r.unit.owner().id() === this.game.myPlayer()?.id(), ); if (this.potentialUpgrade) { this.potentialUpgrade.iconContainer.filters = [