Merge HeliLand into Land activity

This commit is contained in:
reaperrr
2019-03-27 00:52:18 +01:00
committed by Paul Chote
parent bc3cabdea0
commit 14bd5ada1a
10 changed files with 55 additions and 100 deletions

View File

@@ -314,14 +314,14 @@ namespace OpenRA.Mods.Common.Traits
// Add land activity if LandOnCondidion resolves to true and the actor can land at the current location.
if (!ForceLanding && landNow.HasValue && landNow.Value && airborne && CanLand(self.Location)
&& !(self.CurrentActivity is HeliLand || self.CurrentActivity is Turn))
&& !((self.CurrentActivity is Land && Info.VTOL) || self.CurrentActivity is Turn))
{
self.CancelActivity();
if (Info.TurnToLand)
self.QueueActivity(new Turn(self, Info.InitialFacing));
self.QueueActivity(new HeliLand(self, true));
self.QueueActivity(new Land(self, true));
ForceLanding = true;
}
@@ -625,7 +625,7 @@ namespace OpenRA.Mods.Common.Traits
if (Info.TurnToLand)
self.QueueActivity(new Turn(self, Info.InitialFacing));
self.QueueActivity(new HeliLand(self, true));
self.QueueActivity(new Land(self, true));
}
else if (!Info.CanHover && !atLandAltitude)
self.QueueActivity(new FlyCircle(self, -1, Info.IdleTurnSpeed > -1 ? Info.IdleTurnSpeed : TurnSpeed));
@@ -815,7 +815,7 @@ namespace OpenRA.Mods.Common.Traits
if (!Info.VTOL)
return new Land(self, target, false);
return new HeliLand(self, false);
return new Land(self, false);
}
public Activity VisualMove(Actor self, WPos fromPos, WPos toPos)

View File

@@ -193,7 +193,7 @@ namespace OpenRA.Mods.Common.Traits
Unloading = true;
if (aircraft != null)
self.QueueActivity(new HeliLand(self, true));
self.QueueActivity(new Land(self, true));
self.QueueActivity(new UnloadCargo(self, true));
}
}