diff --git a/OpenRA.Mods.RA/InvisibleToEnemy.cs b/OpenRA.Mods.RA/InvisibleToEnemy.cs index bce440b9f0..1988677e3a 100644 --- a/OpenRA.Mods.RA/InvisibleToEnemy.cs +++ b/OpenRA.Mods.RA/InvisibleToEnemy.cs @@ -20,7 +20,8 @@ namespace OpenRA.Mods.RA { public bool IsVisible(Actor self) { - return self.World.LocalPlayer == null || self.Owner == self.World.LocalPlayer; + return self.World.LocalPlayer == null || + self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally; } public Color RadarColorOverride(Actor self) @@ -30,10 +31,10 @@ namespace OpenRA.Mods.RA } static readonly Renderable[] Nothing = { }; + public IEnumerable ModifyRender(Actor self, IEnumerable r) { - return self.World.LocalPlayer == null || self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally - ? r : Nothing; + return IsVisible(self) ? r : Nothing; } } }