Airstate danger avoidance: check the aircraft nearest target actor, instead of target actor

This commit is contained in:
dnqbob
2025-10-19 11:52:11 +08:00
committed by Gustas Kažukauskas
parent 8144c5684e
commit 24a09a94fe

View File

@@ -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;