changes facing (and desireFacing) on Mobile and on Turreted. range is now 0..255

This commit is contained in:
Bob
2009-10-19 23:45:14 +13:00
parent 451fdc1615
commit a7ce0f97d1
14 changed files with 162 additions and 150 deletions

View File

@@ -21,27 +21,29 @@ namespace OpenRa.Game
}
public override void Apply( Game game, bool leftMouseButton )
{
if (leftMouseButton) return;
if (game.LocalPlayer == Unit.Owner)
{
if (leftMouseButton) return;
if (game.LocalPlayer == Unit.Owner)
game.PlaySound("ackno.r00", false);
Unit.traits.Get<Traits.Mobile>().destination = Destination;
var mobile = Unit.traits.Get<Traits.Mobile>();
mobile.destination = Destination;
mobile.desiredFacing = null;
}
}
class DeployMcvOrder : Order
{
Actor Unit;
Actor Unit;
int2 Location;
public DeployMcvOrder( Actor unit, int2 location )
{
Unit = unit;
Unit = unit;
Location = location;
}
public override void Apply( Game game, bool leftMouseButton )
{
{
if (leftMouseButton) return;
Unit.traits.Get<Traits.McvDeploy>().DeployLocation = Location;
var mobile = Unit.traits.Get<Traits.Mobile>();