diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index 800317fdf4..8312935b66 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -189,7 +189,12 @@ namespace OpenRA.Traits public interface IDefaultVisibilityInfo : ITraitInfo { } public interface IDefaultVisibility { bool IsVisible(Actor self, Player byPlayer); } public interface IVisibilityModifier { bool IsVisible(Actor self, Player byPlayer); } - public interface IFogVisibilityModifier { bool HasFogVisibility(Player byPlayer); } + + public interface IFogVisibilityModifier + { + bool IsVisible(Actor actor); + bool HasFogVisibility(Player byPlayer); + } public interface IRadarColorModifier { Color RadarColorOverride(Actor self); } diff --git a/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs b/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs index e8612a11dc..202414ef48 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs @@ -80,6 +80,15 @@ namespace OpenRA.Mods.RA.Traits { return Granted || GrantedAllies; } + + public bool IsVisible(Actor actor) + { + var gpsDot = actor.TraitOrDefault(); + if (gpsDot == null) + return false; + + return gpsDot.IsDotVisible(Owner); + } } class GpsPowerInfo : SupportPowerInfo