HackyAI can now build buildings with new MCV

There was an issue where HackyAI would try to build buildings
at old base location and would fail, unless it was placed at the
same place where the old MCV was.
This commit is contained in:
Saulius Menkevičius
2015-03-11 18:27:13 +02:00
parent f5535c00a2
commit e1fa6af954
2 changed files with 25 additions and 11 deletions

View File

@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Common.AI
protected static CPos RandomBuildingLocation(Squad squad)
{
var location = squad.Bot.BaseCenter;
var location = squad.Bot.GetRandomBaseCenter();
var buildings = squad.World.ActorsWithTrait<Building>()
.Where(a => a.Actor.Owner == squad.Bot.Player).Select(a => a.Actor).ToList();
if (buildings.Count > 0)