From fd630b6d370d43e41ae4df344511aff95380dc50 Mon Sep 17 00:00:00 2001 From: James Turner <zakalawe@mac.com> Date: Fri, 23 Oct 2020 16:00:27 +0100 Subject: [PATCH] Traffic: adjust failure of for reachedEndOfCruise When reachedEndOfCruise fails, return true, so we trigger the next phase of the flight. Without this we get stuck logging the error message, but not progressing the flight. --- src/AIModel/AIAircraft.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/AIModel/AIAircraft.cxx b/src/AIModel/AIAircraft.cxx index 088670c0d..1bed920d5 100644 --- a/src/AIModel/AIAircraft.cxx +++ b/src/AIModel/AIAircraft.cxx @@ -1341,7 +1341,9 @@ bool FGAIAircraft::reachedEndOfCruise(double &distance) { FGAIWaypoint* curr = fp->getCurrentWaypoint(); if (!curr) { SG_LOG(SG_AI, SG_WARN, "FGAIAircraft::reachedEndOfCruise: no current waypoint"); - return false; + + // return true (=done) here, so we don't just get stuck on this forever + return true; } if (curr->getName() == string("BOD")) {