Make Tick return bool
This commit is contained in:
@@ -23,20 +23,20 @@ namespace OpenRA.Mods.Common.Activities
|
||||
aircraft = self.Trait<Aircraft>();
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
public override bool Tick(Actor self)
|
||||
{
|
||||
// Refuse to take off if it would land immediately again.
|
||||
if (aircraft.ForceLanding)
|
||||
{
|
||||
Cancel(self);
|
||||
return NextActivity;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (IsCanceling || !self.World.Map.Contains(self.Location))
|
||||
return NextActivity;
|
||||
return true;
|
||||
|
||||
Fly.FlyTick(self, aircraft, aircraft.Facing, aircraft.Info.CruiseAltitude);
|
||||
return this;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user