Add LandOnCondition to the trait Aircraft which triggers a landing and prevents takeoffs while the condition is met
This commit is contained in:
committed by
atlimit8
parent
c4d2fdbd83
commit
1d1802a163
@@ -25,6 +25,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
// Refuse to take off if it would land immediately again.
|
||||
if (plane.ForceLanding)
|
||||
{
|
||||
Cancel(self);
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
if (IsCanceled || !self.World.Map.Contains(self.Location))
|
||||
return NextActivity;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user