Prevent an infinite loop when planes go out of ammo and all airfields are gone

This commit is contained in:
Oliver Brakmann
2016-09-05 19:59:01 +02:00
parent 351c231693
commit daa1f16e98

View File

@@ -112,7 +112,11 @@ namespace OpenRA.Mods.Common.Activities
new FlyCircleTimed(self, plane.Info.NumberOfTicksToVerifyAvailableAirport),
this);
else
{
// Prevent an infinite loop in case we'd return to the activity that called ReturnToBase in the first place. Go idle instead.
Cancel(self);
return NextActivity;
}
}
List<Activity> landingProcedures = new List<Activity>();