Streamline Land activity

Removed some redundant parameters, some redundant overloads
and made Land always consider LandAltitude relative to target.
This commit is contained in:
reaperrr
2019-04-26 01:30:49 +02:00
committed by Paul Chote
parent 14bd5ada1a
commit 0c2666b97e
11 changed files with 47 additions and 70 deletions

View File

@@ -192,7 +192,7 @@ namespace OpenRA.Mods.Common.Activities
if (aircraft.Info.TurnToLand)
Queue(self, new Turn(self, aircraft.Info.InitialFacing));
Queue(self, new Land(self, true));
Queue(self, new Land(self));
return NextActivity;
}
else
@@ -225,16 +225,10 @@ namespace OpenRA.Mods.Common.Activities
{
aircraft.MakeReservation(dest);
if (aircraft.Info.VTOL)
{
if (aircraft.Info.TurnToDock)
QueueChild(self, new Turn(self, aircraft.Info.InitialFacing), true);
QueueChild(self, new Land(self, true, dest), true);
}
else
QueueChild(self, new Land(self, Target.FromPos(dest.CenterPosition + offset), true, dest), true);
if (aircraft.Info.VTOL && aircraft.Info.TurnToDock)
QueueChild(self, new Turn(self, aircraft.Info.InitialFacing), true);
QueueChild(self, new Land(self, Target.FromActor(dest), offset), true);
QueueChild(self, new Resupply(self, dest, WDist.Zero), true);
resupplied = true;
}