mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
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
This commit is contained in:
parent
bc7faee880
commit
5b271df66f
@ -870,12 +870,12 @@ class FlightPlanBuilder:
|
|||||||
"""Creates a default flight plan for the given mission."""
|
"""Creates a default flight plan for the given mission."""
|
||||||
if flight not in self.package.flights:
|
if flight not in self.package.flights:
|
||||||
raise RuntimeError("Flight must be a part of the package")
|
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
|
from game.navmesh import NavMeshError
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if self.package.waypoints is None:
|
||||||
|
self.regenerate_package_waypoints()
|
||||||
flight.flight_plan = self.generate_flight_plan(flight, custom_targets)
|
flight.flight_plan = self.generate_flight_plan(flight, custom_targets)
|
||||||
except NavMeshError as ex:
|
except NavMeshError as ex:
|
||||||
color = "blue" if self.is_player else "red"
|
color = "blue" if self.is_player else "red"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user