AnyUnitsAt: Ignore destroyed Units

This commit is contained in:
Guido L.
2014-11-09 03:15:33 +01:00
parent 2ab8b28bcf
commit ae4ee0926a

View File

@@ -281,8 +281,7 @@ 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))
if ((always || i.SubCell == sub || i.SubCell == SubCell.FullCell) && !i.Actor.Destroyed && withCondition(i.Actor))
return true;
return false;