From 5992530655dc75d5f1c96ef6e1fba3413df39f3e Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 17 Jun 2016 00:20:57 +0200 Subject: [PATCH] Fix AI giving orders to MCVs that already have orders Checking for IsMoving is a flawed approach no matter how you look at it. The MCV might just have temporarily stopped due to an obstacle, or about to be deployed. Checking for IsIdle instead ensures that the MCV really isn't already in the process of doing something. --- OpenRA.Mods.Common/AI/HackyAI.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/AI/HackyAI.cs b/OpenRA.Mods.Common/AI/HackyAI.cs index cbc3146afd..1ce6dc446b 100644 --- a/OpenRA.Mods.Common/AI/HackyAI.cs +++ b/OpenRA.Mods.Common/AI/HackyAI.cs @@ -825,8 +825,7 @@ namespace OpenRA.Mods.Common.AI foreach (var mcv in mcvs) { - var mover = mcv.TraitOrDefault(); - if (mover != null && mover.IsMoving) + if (!mcv.IsIdle) continue; var factType = mcv.Info.TraitInfo().IntoActor;