fixed order canceling
This commit is contained in:
@@ -31,6 +31,7 @@ namespace OpenRa.Game
|
|||||||
if (Game.LocalPlayer == Unit.Owner)
|
if (Game.LocalPlayer == Unit.Owner)
|
||||||
Game.PlaySound("ackno.r00", false);
|
Game.PlaySound("ackno.r00", false);
|
||||||
var mobile = Unit.traits.Get<Traits.Mobile>();
|
var mobile = Unit.traits.Get<Traits.Mobile>();
|
||||||
|
mobile.Cancel(Unit);
|
||||||
mobile.QueueAction( new Traits.Mobile.MoveTo( Destination ) );
|
mobile.QueueAction( new Traits.Mobile.MoveTo( Destination ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ namespace OpenRa.Game.Traits
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Cancel(Actor self)
|
||||||
|
{
|
||||||
|
if (currentAction != null)
|
||||||
|
currentAction.Cancel(self, this);
|
||||||
|
}
|
||||||
|
|
||||||
public interface CurrentAction
|
public interface CurrentAction
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user