get rid of crazy wasted work in HackyAI
This commit is contained in:
@@ -165,13 +165,12 @@ namespace OpenRA.Mods.RA.AI
|
|||||||
{
|
{
|
||||||
var bi = Rules.Info[actorType].Traits.Get<BuildingInfo>();
|
var bi = Rules.Info[actorType].Traits.Get<BuildingInfo>();
|
||||||
|
|
||||||
for (var k = 0; k < MaxBaseDistance; k++)
|
foreach (var t in world.FindTilesInCircle(baseCenter, MaxBaseDistance))
|
||||||
foreach (var t in world.FindTilesInCircle(baseCenter, k))
|
if (world.CanPlaceBuilding(actorType, bi, t, null))
|
||||||
if (world.CanPlaceBuilding(actorType, bi, t, null))
|
if (bi.IsCloseEnoughToBase(world, p, actorType, t))
|
||||||
if (bi.IsCloseEnoughToBase(world, p, actorType, t))
|
if (NoBuildingsUnder(Util.ExpandFootprint(
|
||||||
if (NoBuildingsUnder(Util.ExpandFootprint(
|
FootprintUtils.Tiles(actorType, bi, t), false)))
|
||||||
FootprintUtils.Tiles(actorType, bi, t), false)))
|
return t;
|
||||||
return t;
|
|
||||||
|
|
||||||
return null; // i don't know where to put it.
|
return null; // i don't know where to put it.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user