add check for NextActivity to FlyCircle
prevent infinite loop fix for ReturnToBase cleanup
This commit is contained in:
@@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
public override Activity Tick(Actor self)
|
public override Activity Tick(Actor self)
|
||||||
{
|
{
|
||||||
|
if (NextActivity != null && remainingTicks <= 0)
|
||||||
|
return NextActivity;
|
||||||
|
|
||||||
// Refuse to take off if it would land immediately again.
|
// Refuse to take off if it would land immediately again.
|
||||||
if (aircraft.ForceLanding)
|
if (aircraft.ForceLanding)
|
||||||
{
|
{
|
||||||
@@ -41,8 +44,6 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
if (remainingTicks > 0)
|
if (remainingTicks > 0)
|
||||||
remainingTicks--;
|
remainingTicks--;
|
||||||
else if (remainingTicks == 0)
|
|
||||||
return NextActivity;
|
|
||||||
|
|
||||||
// We can't possibly turn this fast
|
// We can't possibly turn this fast
|
||||||
var desiredFacing = aircraft.Facing + 64;
|
var desiredFacing = aircraft.Facing + 64;
|
||||||
|
|||||||
Reference in New Issue
Block a user