correct cursor for healing

This commit is contained in:
Chris Forbes
2009-12-31 16:44:29 +13:00
parent 493e207bbf
commit 4a52a38d0f
4 changed files with 5 additions and 3 deletions

View File

@@ -138,6 +138,7 @@ namespace OpenRa.Game
switch( s )
{
case "Attack": return Cursor.Attack;
case "Heal": return Cursor.Heal;
case "C4": return Cursor.C4;
case "Move":
if (movement.CanEnterCell(location))

View File

@@ -25,5 +25,6 @@ namespace OpenRa.Game
public static Cursor Chronoshift { get { return new Cursor("chrono"); } }
public static Cursor C4 { get { return new Cursor("c4"); } }
public static Cursor Capture { get { return new Cursor("capture"); } }
public static Cursor Heal { get { return new Cursor("heal"); } }
}
}

View File

@@ -146,12 +146,12 @@ namespace OpenRa.Game.Traits
if (((underCursor.Owner == self.Owner) ^ isHeal)
&& !mi.Modifiers.HasModifier( Modifiers.Ctrl )) return null;
if (!Combat.HasAnyValidWeapons(self, underCursor)) return null;
return new Order("Attack", self, underCursor, int2.Zero, null);
return new Order(isHeal ? "Heal" : "Attack", self, underCursor, int2.Zero, null);
}
public void ResolveOrder(Actor self, Order order)
{
if (order.OrderString == "Attack")
if (order.OrderString == "Attack" || order.OrderString == "Heal")
{
self.CancelActivity();
QueueAttack(self, order);

View File

@@ -388,7 +388,7 @@
<sequence name="guard-minimap" start="146" length="1" />
<sequence name="guard" start="147" length="1" x="12" y="12" />
<sequence name="sell-vehicle" start="148" length="12" />
<sequence name="heal" start="160" length="4" />
<sequence name="heal" start="160" length="4" x="12" y="12"/>
<sequence name="capture" start="164" length="3" />
<sequence name="capture-minimap" start="167" length="3" />
<sequence name="repair2" start="170" length="24" />