From 5b271df66f42d01a497c222f0aca3d673e7ea534 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 28 May 2021 17:25:40 -0700 Subject: [PATCH] Propagate planning error for package waypoints. We did this for the flight plan itself, but did not if the package waypoints failed to generate. https://github.com/dcs-liberation/dcs_liberation/issues/1140 --- gen/flights/flightplan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/flights/flightplan.py b/gen/flights/flightplan.py index ebe4bcab..94f7fe24 100644 --- a/gen/flights/flightplan.py +++ b/gen/flights/flightplan.py @@ -870,12 +870,12 @@ class FlightPlanBuilder: """Creates a default flight plan for the given mission.""" if flight not in self.package.flights: raise RuntimeError("Flight must be a part of the package") - if self.package.waypoints is None: - self.regenerate_package_waypoints() from game.navmesh import NavMeshError try: + if self.package.waypoints is None: + self.regenerate_package_waypoints() flight.flight_plan = self.generate_flight_plan(flight, custom_targets) except NavMeshError as ex: color = "blue" if self.is_player else "red"