move-blocked cursor is now used for impossible moves

This commit is contained in:
Chris Forbes
2009-10-23 21:14:32 +13:00
parent 7d6e254983
commit f17e0eec75

View File

@@ -72,7 +72,11 @@ namespace OpenRa.Game
var uog = orderGenerator as UnitOrderGenerator;
if (uog != null && uog.selection.Count > 0 && uog.selection.Any(a => a.traits.Contains<Traits.Mobile>()))
{
if (!Game.IsCellBuildable(dragEnd.ToInt2(), UnitMovementType.Wheel))
return Cursor.MoveBlocked; /* todo: handle non-wheel movement behavior */
return Cursor.Move;
}
if (Game.SelectUnitOrBuilding(Game.CellSize * dragEnd).Any())
return Cursor.Select;