Fix bogus ClampToWorld behavior (allowed helicopters to fly outside map)

This commit is contained in:
Paul Chote
2011-03-19 21:00:20 +13:00
parent 41a6e94e87
commit 0d53346138
4 changed files with 5 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.RA.Air
{
UnReserve();
var target = order.TargetLocation.Clamp(self.World.Map.Bounds);
var target = self.World.ClampToWorld(order.TargetLocation);
self.SetTargetLine(Target.FromCell(target), Color.Green);
self.CancelActivity();
self.QueueActivity(Fly.ToCell(target));