move-blocked cursor is now used for impossible moves
This commit is contained in:
@@ -72,7 +72,11 @@ namespace OpenRa.Game
|
|||||||
var uog = orderGenerator as UnitOrderGenerator;
|
var uog = orderGenerator as UnitOrderGenerator;
|
||||||
|
|
||||||
if (uog != null && uog.selection.Count > 0 && uog.selection.Any(a => a.traits.Contains<Traits.Mobile>()))
|
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;
|
return Cursor.Move;
|
||||||
|
}
|
||||||
|
|
||||||
if (Game.SelectUnitOrBuilding(Game.CellSize * dragEnd).Any())
|
if (Game.SelectUnitOrBuilding(Game.CellSize * dragEnd).Any())
|
||||||
return Cursor.Select;
|
return Cursor.Select;
|
||||||
|
|||||||
Reference in New Issue
Block a user