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.
This commit is contained in:
Dan Albert 2021-07-13 20:11:09 -07:00
parent 7c3e08050f
commit a7d49b986d

View File

@ -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