Fix chronoshift cursor

This commit is contained in:
Paul Chote
2010-01-03 18:50:52 +13:00
parent 30deb16620
commit 67cda2162b

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Drawing; using System.Drawing;
using OpenRa.Game.Traits;
namespace OpenRa.Game.Orders namespace OpenRa.Game.Orders
{ {
@@ -34,7 +35,8 @@ namespace OpenRa.Game.Orders
public Cursor GetCursor(int2 xy, MouseInput mi) public Cursor GetCursor(int2 xy, MouseInput mi)
{ {
return Cursor.Chronoshift; var movement = self.traits.WithInterface<IMovement>().FirstOrDefault();
return (movement.CanEnterCell(xy)) ? Cursor.Chronoshift : Cursor.MoveBlocked;
} }
} }
} }