From 9581595a3dedbf2cd327654ce6992ca49ddc333a Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 27 Dec 2011 21:53:31 +1300 Subject: [PATCH] remove spurious null checks in Shroud -- all actors have an owner, always. --- OpenRA.Game/Traits/World/Shroud.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index abdf5844d9..e2e3c13a08 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -77,7 +77,7 @@ namespace OpenRA.Traits if (!a.HasTrait()) return; - if (a.Owner == null || a.Owner.World.LocalPlayer == null + if (a.Owner.World.LocalPlayer == null || a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return; if (vis.ContainsKey(a)) @@ -159,7 +159,7 @@ namespace OpenRA.Traits public void UpdateActor(Actor a) { - if (a.Owner == null || a.Owner.World.LocalPlayer == null + if (a.Owner.World.LocalPlayer == null || a.Owner.Stances[a.Owner.World.LocalPlayer] != Stance.Ally) return; RemoveActor(a); AddActor(a);