Merge pull request #6905 from LipkeGu/Dont_query_traits_on_dead_units
AnyUnitsAt: Ignore Units which are Destroyed
This commit is contained in:
@@ -281,8 +281,7 @@ 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