#117 off-map planes should spawn at cruise altitude

This commit is contained in:
Chris Forbes
2010-03-27 18:07:01 +13:00
parent 17b135926d
commit f6a52f4e50
4 changed files with 5 additions and 2 deletions

View File

@@ -78,6 +78,7 @@ namespace OpenRA.Mods.RA
{
var a = w.CreateActor("BADR", startPos, owner);
a.traits.Get<Unit>().Facing = Util.GetFacing(p - startPos, 0);
a.traits.Get<Unit>().Altitude = a.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
a.CancelActivity();
a.QueueActivity(new FlyCircle(p));

View File

@@ -53,6 +53,7 @@ namespace OpenRA.Mods.RA
var enterCell = self.World.ChooseRandomEdgeCell();
var plane = self.World.CreateActor("U2", enterCell, self.Owner);
plane.traits.Get<Unit>().Altitude = plane.Info.Traits.Get<PlaneInfo>().CruiseAltitude;
plane.traits.Get<Unit>().Facing = Util.GetFacing(order.TargetLocation - enterCell, 0);
plane.CancelActivity();