add check for NextActivity to FlyCircle

prevent infinite loop

fix for ReturnToBase

cleanup
This commit is contained in:
tovl
2019-01-28 22:20:08 +01:00
committed by Paul Chote
parent b71c080285
commit ee19cb61b4

View File

@@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Activities
public override Activity Tick(Actor self)
{
if (NextActivity != null && remainingTicks <= 0)
return NextActivity;
// Refuse to take off if it would land immediately again.
if (aircraft.ForceLanding)
{
@@ -41,8 +44,6 @@ namespace OpenRA.Mods.Common.Activities
if (remainingTicks > 0)
remainingTicks--;
else if (remainingTicks == 0)
return NextActivity;
// We can't possibly turn this fast
var desiredFacing = aircraft.Facing + 64;