Make Tick return bool
This commit is contained in:
@@ -62,13 +62,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
Game.Sound.Play(SoundType.World, aircraft.Info.TakeoffSounds, self.World, aircraft.CenterPosition);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
var dat = self.World.Map.DistanceAboveTerrain(aircraft.CenterPosition);
|
||||
@@ -78,12 +78,12 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (aircraft.Info.VTOL)
|
||||
{
|
||||
Fly.VerticalTakeOffOrLandTick(self, aircraft, aircraft.Facing, aircraft.Info.CruiseAltitude);
|
||||
return this;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Fly.FlyTick(self, aircraft, aircraft.Facing, aircraft.Info.CruiseAltitude);
|
||||
return this;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,14 +91,14 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (moveToRallyPoint && NextActivity == null)
|
||||
{
|
||||
if (!aircraft.Info.VTOL && assignTargetOnFirstRun)
|
||||
return NextActivity;
|
||||
return true;
|
||||
|
||||
QueueChild(new AttackMoveActivity(self, () => move.MoveToTarget(self, target)));
|
||||
moveToRallyPoint = false;
|
||||
return this;
|
||||
return false;
|
||||
}
|
||||
|
||||
return NextActivity;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user