Add LandOnCondition to the trait Aircraft which triggers a landing and prevents takeoffs while the condition is met

This commit is contained in:
Jean-Rémy Buchs
2017-06-03 00:48:28 +02:00
committed by atlimit8
parent c4d2fdbd83
commit 1d1802a163
13 changed files with 126 additions and 2 deletions

View File

@@ -110,6 +110,11 @@ namespace OpenRA.Mods.Common.Activities
public override Activity Tick(Actor self)
{
// Refuse to take off if it would land immediately again.
// Special case: Don't kill other deploy hotkey activities.
if (plane.ForceLanding)
return NextActivity;
if (IsCanceled || self.IsDead)
return NextActivity;