fixed unit ack sound to only happen when *issuing* the order

This commit is contained in:
Chris Forbes
2009-10-15 07:38:27 +13:00
parent 05cbf6b680
commit 197483f973
2 changed files with 3 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ namespace OpenRa.Game
public override void Apply( Game game, bool leftMouseButton ) public override void Apply( Game game, bool leftMouseButton )
{ {
if (leftMouseButton) return; if (leftMouseButton) return;
if (game.LocalPlayer == Unit.Owner)
game.PlaySound("ackno.r00", false);
Unit.traits.Get<Traits.Mobile>().destination = Destination; Unit.traits.Get<Traits.Mobile>().destination = Destination;
} }
} }

View File

@@ -103,8 +103,6 @@ namespace OpenRa.Game.Traits
{ {
if (xy != toCell) if (xy != toCell)
{ {
if (game.LocalPlayer == self.Owner)
game.PlaySound("ackno.r00", false);
return new MoveOrder(self, xy); return new MoveOrder(self, xy);
} }
return null; return null;