diff --git a/OpenRA.Game/Traits/Plane.cs b/OpenRA.Game/Traits/Plane.cs index 928d20c862..816d38f19a 100644 --- a/OpenRA.Game/Traits/Plane.cs +++ b/OpenRA.Game/Traits/Plane.cs @@ -24,7 +24,7 @@ using OpenRA.Traits.Activities; namespace OpenRA.Traits { - class PlaneInfo : ITraitInfo + public class PlaneInfo : ITraitInfo { public readonly int CruiseAltitude = 20; public readonly string[] RearmBuildings = { "afld" }; @@ -33,7 +33,7 @@ namespace OpenRA.Traits public object Create(Actor self) { return new Plane(self); } } - class Plane : IIssueOrder, IResolveOrder, IMovement + public class Plane : IIssueOrder, IResolveOrder, IMovement { public IDisposable reservation; diff --git a/OpenRA.Mods.Cnc/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/ProductionAirdrop.cs index af03f7287b..ff5c0c665b 100644 --- a/OpenRA.Mods.Cnc/ProductionAirdrop.cs +++ b/OpenRA.Mods.Cnc/ProductionAirdrop.cs @@ -49,6 +49,7 @@ namespace OpenRA.Mods.Cnc var a = w.CreateActor("C17", startPos, owner); var cargo = a.traits.Get(); a.traits.Get().Facing = 64; + a.traits.Get().Altitude = a.Info.Traits.Get().CruiseAltitude; var newUnit = new Actor(self.World, producee.Name, new int2(0, 0), self.Owner); cargo.Load(a, newUnit); diff --git a/OpenRA.Mods.RA/ParatroopersPower.cs b/OpenRA.Mods.RA/ParatroopersPower.cs index ee11105813..b6b4ee9309 100644 --- a/OpenRA.Mods.RA/ParatroopersPower.cs +++ b/OpenRA.Mods.RA/ParatroopersPower.cs @@ -78,6 +78,7 @@ namespace OpenRA.Mods.RA { var a = w.CreateActor("BADR", startPos, owner); a.traits.Get().Facing = Util.GetFacing(p - startPos, 0); + a.traits.Get().Altitude = a.Info.Traits.Get().CruiseAltitude; a.CancelActivity(); a.QueueActivity(new FlyCircle(p)); diff --git a/OpenRA.Mods.RA/SpyPlanePower.cs b/OpenRA.Mods.RA/SpyPlanePower.cs index cf457f7c4f..92cf2aa65f 100644 --- a/OpenRA.Mods.RA/SpyPlanePower.cs +++ b/OpenRA.Mods.RA/SpyPlanePower.cs @@ -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().Altitude = plane.Info.Traits.Get().CruiseAltitude; plane.traits.Get().Facing = Util.GetFacing(order.TargetLocation - enterCell, 0); plane.CancelActivity();