From 639a7e316b06c4a17e07acbc5fef2072678ef68f Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 4 Feb 2011 21:49:18 +1300 Subject: [PATCH] Fix crates --- OpenRA.Game/Traits/World/UnitInfluence.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/World/UnitInfluence.cs b/OpenRA.Game/Traits/World/UnitInfluence.cs index 74557a085d..7b7e0890d1 100644 --- a/OpenRA.Game/Traits/World/UnitInfluence.cs +++ b/OpenRA.Game/Traits/World/UnitInfluence.cs @@ -47,7 +47,7 @@ namespace OpenRA.Traits if (!map.IsInMap(a)) yield break; for( var i = influence[ a.X, a.Y ] ; i != null ; i = i.next ) - if (!i.actor.Destroyed && !i.actor.IsDead()) + if (!i.actor.Destroyed) yield return i.actor; } @@ -67,6 +67,9 @@ namespace OpenRA.Traits // crushing other subcell units in the future. public SubCell GetFreeSubcell(int2 a, SubCell preferred) { + if (preferred == SubCell.FullCell) + return preferred; + return new[]{ preferred, SubCell.TopLeft, SubCell.TopRight, SubCell.Center, SubCell.BottomLeft, SubCell.BottomRight}.First(b => {