From 24a09a94fe1d9473ee3890e397844d0bfb7b0f02 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Sun, 19 Oct 2025 11:52:11 +0800 Subject: [PATCH] Airstate danger avoidance: check the aircraft nearest target actor, instead of target actor --- OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs index 5a300192e6..898ab0f1e9 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/Squads/States/AirStates.cs @@ -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;