From f648223c39433b9d2bd6a45f5deded0dcaaa58cb Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Sun, 12 Aug 2012 12:59:17 +1200 Subject: [PATCH] Improve the deploy routine so that baseCenter is still set even if the mcv is a fact --- OpenRA.Mods.RA/AI/HackyAI.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index e05e70b3c2..ddd4da9dca 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -438,12 +438,16 @@ namespace OpenRA.Mods.RA.AI { /* find our mcv and deploy it */ var mcv = self.World.Actors - .FirstOrDefault(a => a.Owner == p && a.HasTrait() && a.HasTrait()); + .FirstOrDefault(a => a.Owner == p && a.HasTrait()); if (mcv != null) { baseCenter = mcv.Location; - world.IssueOrder(new Order("DeployTransform", mcv, false)); + //Don't transform the mcv if it is a fact + if (mcv.HasTrait()) + { + world.IssueOrder(new Order("DeployTransform", mcv, false)); + } } else BotDebug("AI: Can't find BaseBuildUnit.");