From 1527e472b6a333072c02afc8684c7367452e3052 Mon Sep 17 00:00:00 2001 From: Caleb Anderson Date: Tue, 26 Oct 2010 22:21:16 -0500 Subject: [PATCH] potential fix for bug 312 : PlaceBuilding.ResolveOrder does not validate the requested build location --- OpenRA.Mods.RA/Player/PlaceBuilding.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.RA/Player/PlaceBuilding.cs b/OpenRA.Mods.RA/Player/PlaceBuilding.cs index 8086f7e229..34971cc369 100755 --- a/OpenRA.Mods.RA/Player/PlaceBuilding.cs +++ b/OpenRA.Mods.RA/Player/PlaceBuilding.cs @@ -61,6 +61,11 @@ namespace OpenRA.Mods.RA } else { + if (!self.World.CanPlaceBuilding(order.TargetString, buildingInfo, order.TargetLocation, null)) + { + return; + } + var building = w.CreateActor(order.TargetString, new TypeDictionary { new LocationInit( order.TargetLocation ),