diff --git a/OpenRA.Game/Traits/SelectionDecorations.cs b/OpenRA.Game/Traits/SelectionDecorations.cs index 0a28adde06..ab9293d688 100644 --- a/OpenRA.Game/Traits/SelectionDecorations.cs +++ b/OpenRA.Game/Traits/SelectionDecorations.cs @@ -31,8 +31,10 @@ namespace OpenRA.Traits public void RenderAfterWorld(WorldRenderer wr) { - var bounds = self.Bounds.Value; + if (self.World.FogObscures(self)) + return; + var bounds = self.Bounds.Value; var xy = new float2(bounds.Left, bounds.Top); var xY = new float2(bounds.Left, bounds.Bottom); diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index 1674c9aa31..6ac2ff50cd 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -100,6 +100,7 @@ namespace OpenRA.Mods.RA public IEnumerable ModifyRender(Actor self, WorldRenderer wr, IEnumerable r) { + // TODO: Make this consistent with everything else that adds animations to RenderSimple. if ((self.Owner == self.World.LocalPlayer || self.World.LocalPlayer == null) && Level > 0) return InnerModifyRender(self, wr, r); else @@ -112,6 +113,10 @@ namespace OpenRA.Mods.RA yield return rs; RankAnim.Tick(); // HACK + + if (self.World.FogObscures(self)) + yield break; + var bounds = self.Bounds.Value; yield return new Renderable(RankAnim.Image, new float2(bounds.Right - 6, bounds.Bottom - 8), wr.Palette("effect"), self.CenterLocation.Y);