From 01f72f4f44c6dfafbf225b34b06a28ce66c57688 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 14 Jul 2013 23:14:09 -0300 Subject: [PATCH 1/2] Revert "allow the AI to base-walk without restrictions" This reverts commit d08d3d6e238324c953c2d501514eb882e0e3e169. --- OpenRA.Mods.RA/AI/HackyAI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index d6407cdf84..03fd29c437 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -907,7 +907,7 @@ namespace OpenRA.Mods.RA.AI CPos defenseCenter; public CPos? ChooseBuildLocation(string actorType, BuildingType type) { - return ChooseBuildLocation(actorType, false, MaxBaseDistance, type); + return ChooseBuildLocation(actorType, true, MaxBaseDistance, type); } public CPos? ChooseBuildLocation(string actorType, bool distanceToBaseIsImportant, int maxBaseDistance, BuildingType type) @@ -956,7 +956,7 @@ namespace OpenRA.Mods.RA.AI break; } - return null; // Don't know where to put it. + return null; // i don't know where to put it. } public void Tick(Actor self) From d3e760659a6f88319569f2bf0d7b0304ccf8b5d3 Mon Sep 17 00:00:00 2001 From: Nico Date: Sun, 14 Jul 2013 23:31:09 -0300 Subject: [PATCH 2/2] fix #3569 , and possible many other bugs... if the place is not close to the base, instead of returning the error, continue to see if there is another place to build --- OpenRA.Mods.RA/AI/HackyAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index 03fd29c437..ecc980e666 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -949,7 +949,7 @@ namespace OpenRA.Mods.RA.AI { if (distanceToBaseIsImportant) if (!bi.IsCloseEnoughToBase(world, p, actorType, t)) - return null; + continue; if (NoBuildingsUnder(Util.ExpandFootprint(FootprintUtils.Tiles(actorType, bi, t), false))) return t; }