mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Increase size of navmesh to avoid planning issues.
The tradeoff is that any flights that might have previously routed _around_ a threat near the edge of the map may no longer do so as the zones at the edge are significantly larger now. Fixes https://github.com/Khopa/dcs_liberation/issues/903
This commit is contained in:
@@ -796,7 +796,17 @@ class FlightPlanBuilder:
|
||||
raise RuntimeError("Flight must be a part of the package")
|
||||
if self.package.waypoints is None:
|
||||
self.regenerate_package_waypoints()
|
||||
flight.flight_plan = self.generate_flight_plan(flight, custom_targets)
|
||||
|
||||
from game.navmesh import NavMeshError
|
||||
|
||||
try:
|
||||
flight.flight_plan = self.generate_flight_plan(flight, custom_targets)
|
||||
except NavMeshError as ex:
|
||||
color = "blue" if self.is_player else "red"
|
||||
raise PlanningError(
|
||||
f"Could not plan {color} {flight.flight_type.value} from "
|
||||
f"{flight.departure} to {flight.package.target}"
|
||||
) from ex
|
||||
|
||||
def generate_flight_plan(
|
||||
self, flight: Flight, custom_targets: Optional[List[Unit]]
|
||||
|
||||
Reference in New Issue
Block a user