Tweak FrozenActorLayer queries:

- FrozenActorsInRegion now filters for valid and (optionally) visible FAs
- Add new FrozenActorsInCircle to mirror World.FindActorsInCircle.

The first change means that SupportPowerDecision now correctly ignores
FrozenActors that the AI has not discovered.
This commit is contained in:
Paul Chote
2018-11-28 21:00:11 +00:00
committed by Oliver Brakmann
parent 3e490e5843
commit 8eeb6d68e7
2 changed files with 20 additions and 4 deletions

View File

@@ -81,8 +81,7 @@ namespace OpenRA.Mods.Common.Traits
// IsValid check filters out Frozen Actors that have not initizialized their Owner
foreach (var scrutinized in checkFrozen)
if (scrutinized.IsValid)
answer += consideration.GetAttractiveness(scrutinized, firedBy.Stances[scrutinized.Owner], firedBy);
answer += consideration.GetAttractiveness(scrutinized, firedBy.Stances[scrutinized.Owner], firedBy);
}
return answer;