From d1a413375249a0db8024ca5e3b68e64367fbb148 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 31 Aug 2017 16:01:20 +0200 Subject: [PATCH] Fix WithShadow It *modifies* the actor rendering, so returning an empty renderable was bogus, as were the IsInWorld/IsDead checks. --- OpenRA.Mods.Common/Traits/Render/WithShadow.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithShadow.cs b/OpenRA.Mods.Common/Traits/Render/WithShadow.cs index b8c69fe6b4..bed1dc2cfc 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithShadow.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithShadow.cs @@ -43,10 +43,7 @@ namespace OpenRA.Mods.Common.Traits.Render public IEnumerable ModifyRender(Actor self, WorldRenderer wr, IEnumerable r) { if (IsTraitDisabled) - return Enumerable.Empty(); - - if (self.IsDead || !self.IsInWorld) - return Enumerable.Empty(); + return r; // Contrails shouldn't cast shadows var height = self.World.Map.DistanceAboveTerrain(self.CenterPosition).Length;