diff --git a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs index 7907a481b6..63a2f7f573 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/CaptureManagerBotModule.cs @@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits readonly World world; readonly Player player; readonly Func isEnemyUnit; - readonly Predicate unitCannotBeOrdered; + readonly Predicate unitCannotBeOrderedOrIsIdle; readonly int maximumCaptureTargetOptions; int minCaptureDelayTicks; @@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Traits && !unit.Info.HasTraitInfo() && unit.Info.HasTraitInfo(); - unitCannotBeOrdered = a => a.Owner != player || a.IsDead || !a.IsInWorld; + unitCannotBeOrderedOrIsIdle = a => a.Owner != player || a.IsDead || !a.IsInWorld || a.IsIdle; maximumCaptureTargetOptions = Math.Max(1, Info.MaximumCaptureTargetOptions); } @@ -118,7 +118,7 @@ namespace OpenRA.Mods.Common.Traits if (!Info.CapturingActorTypes.Any() || player.WinState != WinState.Undefined) return; - activeCapturers.RemoveAll(unitCannotBeOrdered); + activeCapturers.RemoveAll(unitCannotBeOrderedOrIsIdle); var newUnits = world.ActorsHavingTrait() .Where(a => a.Owner == player && !activeCapturers.Contains(a));