From 6c0ab8da64c818a822a81c55b306a9f117725b68 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 12 Apr 2010 21:02:43 +1200 Subject: [PATCH] ban deploying support powers outside the map --- OpenRA.Game/Orders/GenericSelectTarget.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Orders/GenericSelectTarget.cs b/OpenRA.Game/Orders/GenericSelectTarget.cs index 1bff25ab91..cc06a5c2f6 100644 --- a/OpenRA.Game/Orders/GenericSelectTarget.cs +++ b/OpenRA.Game/Orders/GenericSelectTarget.cs @@ -45,14 +45,14 @@ namespace OpenRA.Orders IEnumerable OrderInner(World world, int2 xy, MouseInput mi) { - if (mi.Button == MouseButton.Left) + if (mi.Button == MouseButton.Left && world.Map.IsInMap(xy)) yield return new Order(order, subject, xy); } public virtual void Tick(World world) { } public void Render(World world) { } - public string GetCursor(World world, int2 xy, MouseInput mi) { return cursor; } + public string GetCursor(World world, int2 xy, MouseInput mi) { return world.Map.IsInMap(xy) ? cursor : "generic-blocked"; } } // variant that requires a tag trait (T) to be present on some actor owned