From a7d49b986d44f936f32c28ff9426c8cf2947a50d Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 13 Jul 2021 20:11:09 -0700 Subject: [PATCH] Exclude both path endpoints for joins/splits. Without this the points would often be placed exactly on top of the origin airfield, when in that case we actually should use the fallback behavior. --- gen/flights/flightplan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/flights/flightplan.py b/gen/flights/flightplan.py index ef642b8e..0927b968 100644 --- a/gen/flights/flightplan.py +++ b/gen/flights/flightplan.py @@ -1005,7 +1005,7 @@ class FlightPlanBuilder: ) def safe_points_between(self, a: Point, b: Point) -> Iterator[Point]: - for point in self.coalition.nav_mesh.shortest_path(a, b)[1:]: + for point in self.coalition.nav_mesh.shortest_path(a, b)[1:-1]: if not self.threat_zones.threatened(point): yield point