Fix selection decorations being drawn behind fog.

This commit is contained in:
Paul Chote
2013-04-10 22:12:51 +12:00
parent 9b7bb53287
commit 707c86fbbb
2 changed files with 8 additions and 1 deletions

View File

@@ -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);

View File

@@ -100,6 +100,7 @@ namespace OpenRA.Mods.RA
public IEnumerable<Renderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<Renderable> 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);