Changed IsCloseEnoughToBase to take top-left position.

This commit is contained in:
Bob
2010-01-18 14:22:38 +13:00
parent 7913fcf75b
commit 738d293b48
4 changed files with 7 additions and 6 deletions

View File

@@ -28,8 +28,9 @@ namespace OpenRa.Orders
{
if (mi.Button == MouseButton.Left)
{
var topLeft = xy - Footprint.AdjustForBuildingSize( BuildingInfo );
if (!Game.world.CanPlaceBuilding( Building, BuildingInfo, xy, null, true)
|| !Game.world.IsCloseEnoughToBase(Producer.Owner, Building, BuildingInfo, xy))
|| !Game.world.IsCloseEnoughToBase(Producer.Owner, Building, BuildingInfo, topLeft))
{
Sound.Play("nodeply1.aud");
yield break;