From fd6fdca5a9ed5da263c6506df5da1a2717d98753 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Sun, 10 Sep 2023 13:26:40 +0800 Subject: [PATCH] Ignore the squad member that is entering cargo --- OpenRA.Mods.CA/Traits/BotModules/SquadManagerBotModuleCA.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.CA/Traits/BotModules/SquadManagerBotModuleCA.cs b/OpenRA.Mods.CA/Traits/BotModules/SquadManagerBotModuleCA.cs index aa62146ff9..2c23bf52cd 100644 --- a/OpenRA.Mods.CA/Traits/BotModules/SquadManagerBotModuleCA.cs +++ b/OpenRA.Mods.CA/Traits/BotModules/SquadManagerBotModuleCA.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Mods.CA.Traits.BotModules.Squads; +using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Traits; using OpenRA.Primitives; using OpenRA.Traits; @@ -163,7 +164,7 @@ public SquadManagerBotModuleCA(Actor self, SquadManagerBotModuleCAInfo info) World = self.World; Player = self.Owner; - unitCannotBeOrdered = a => a == null || a.Owner != Player || a.IsDead || !a.IsInWorld; + unitCannotBeOrdered = a => a == null || a.Owner != Player || a.IsDead || !a.IsInWorld || a.CurrentActivity is Enter; } bool IsValidEnemyUnit(Actor a)