Fix the constructor order of FlyForward

This commit is contained in:
abcdefg30
2020-04-16 19:15:50 +02:00
committed by Paul Chote
parent b3aa61ee8e
commit a66305e282
2 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Activities
cruiseAltitude = aircraft.Info.CruiseAltitude;
}
public FlyForward(int ticks, Actor self)
public FlyForward(Actor self, int ticks = -1)
: this(self)
{
flyTicks = ticks;

View File

@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Activities
if (hasTarget)
{
QueueChild(new Fly(self, target));
QueueChild(new FlyForward(-1, self));
QueueChild(new FlyForward(self));
return;
}
@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Activities
if (aircraft.Info.VTOL && self.World.Map.DistanceAboveTerrain(aircraft.CenterPosition) != aircraft.Info.CruiseAltitude)
QueueChild(new TakeOff(self));
QueueChild(new FlyForward(-1, self));
QueueChild(new FlyForward(self));
}
public override bool Tick(Actor self)