wire up BuildAnywhere so it actually works

This commit is contained in:
Chris Forbes
2011-03-07 20:25:05 +13:00
parent 14a2b68b7d
commit 682cfcd466

View File

@@ -35,7 +35,10 @@ namespace OpenRA.Mods.RA.Buildings
public object Create(ActorInitializer init) { return new Building(init, this); }
public bool IsCloseEnoughToBase(World world, Player p, string buildingName, int2 topLeft)
{
{
if (p.PlayerActor.Trait<DeveloperMode>().BuildAnywhere)
return true;
var buildingMaxBounds = Dimensions;
if( Rules.Info[ buildingName ].Traits.Contains<BibInfo>() )
buildingMaxBounds.Y += 1;