From ae4ee0926a50bc21db5c20241dcf757b4fe65291 Mon Sep 17 00:00:00 2001 From: "Guido L." Date: Sun, 9 Nov 2014 03:15:33 +0100 Subject: [PATCH] AnyUnitsAt: Ignore destroyed Units --- OpenRA.Game/Traits/World/ActorMap.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Traits/World/ActorMap.cs b/OpenRA.Game/Traits/World/ActorMap.cs index 585bc0322b..fa6014a108 100644 --- a/OpenRA.Game/Traits/World/ActorMap.cs +++ b/OpenRA.Game/Traits/World/ActorMap.cs @@ -281,9 +281,8 @@ namespace OpenRA.Traits var always = sub == SubCell.FullCell || sub == SubCell.Any; for (var i = influence[a]; i != null; i = i.Next) - if (always || i.SubCell == sub || i.SubCell == SubCell.FullCell) - if (withCondition(i.Actor)) - return true; + if ((always || i.SubCell == sub || i.SubCell == SubCell.FullCell) && !i.Actor.Destroyed && withCondition(i.Actor)) + return true; return false; }