AnyUnitsAt: Ignore destroyed Units
This commit is contained in:
@@ -281,9 +281,8 @@ namespace OpenRA.Traits
|
|||||||
|
|
||||||
var always = sub == SubCell.FullCell || sub == SubCell.Any;
|
var always = sub == SubCell.FullCell || sub == SubCell.Any;
|
||||||
for (var i = influence[a]; i != null; i = i.Next)
|
for (var i = influence[a]; i != null; i = i.Next)
|
||||||
if (always || i.SubCell == sub || i.SubCell == SubCell.FullCell)
|
if ((always || i.SubCell == sub || i.SubCell == SubCell.FullCell) && !i.Actor.Destroyed && withCondition(i.Actor))
|
||||||
if (withCondition(i.Actor))
|
return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user