Airstate danger avoidance: check the aircraft nearest target actor, instead of target actor
This commit is contained in:
committed by
Gustas Kažukauskas
parent
8144c5684e
commit
24a09a94fe
@@ -163,7 +163,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
}
|
||||
}
|
||||
|
||||
if (!NearToPosSafely(owner, owner.Target.CenterPosition))
|
||||
if (!NearToPosSafely(owner, owner.Units.ClosestToIgnoringPath(owner.TargetActor).CenterPosition))
|
||||
{
|
||||
owner.FuzzyStateMachine.ChangeState(owner, new AirFleeState());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user