From 96ecb7c232aecbdfb35d35983564e92bf6f14ef7 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 18 May 2013 15:44:16 +1200 Subject: [PATCH] validate building placement in ResolveOrder as well --- OpenRA.Mods.RA/Player/PlaceBuilding.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs index 9adbef1df0..607b8f647f 100755 --- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs +++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs @@ -62,7 +62,8 @@ namespace OpenRA.Mods.RA } else { - if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null)) + if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null) + || !buildingInfo.IsCloseEnoughToBase(self.World, order.Player, order.TargetString, order.TargetLocation)) { return; }