From 5c47a8f7e108aafcd8102ac3ce1736e9b54f9cf5 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 31 Jan 2021 13:56:18 -0800 Subject: [PATCH] Fix flyover waypoint generation. Fixes https://github.com/Khopa/dcs_liberation/issues/820 --- changelog.md | 1 + gen/aircraft.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 828f0ede..0a345ba0 100644 --- a/changelog.md +++ b/changelog.md @@ -63,6 +63,7 @@ Saves from 2.3 are not compatible with 2.4. * **[Units]** Submarines have been removed for now as they aren't wholly functional. * **[Units]** Fixed "FACTION ERROR : Unable to find OliverHazardPerryGroupGenerator in pydcs" error at startup. * **[Mission Generator]** Fixed a bug where units set to Aggressive stance sometimes did not move. +* **[Mission Generator]** Flyover points for OCA/Aircraft missions are now generated correctly. * **[Flight Planner]** Fixed not being able to create custom waypoints for buildings. * **[Flight Planner]** Strike missions will no longer be automatically planned against SAMs. * **[Flight Planner]** Strike missions will no longer be automatically planned against FOB structures. diff --git a/gen/aircraft.py b/gen/aircraft.py index 51c9dd03..70ab9d67 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -1413,7 +1413,10 @@ class PydcsWaypointBuilder: name=self.mission.string(self.waypoint.name)) if self.waypoint.flyover: - waypoint.type = PointAction.FlyOverPoint.value + waypoint.action = PointAction.FlyOverPoint + # It seems we need to leave waypoint.type exactly as it is even + # though it's set to "Turning Point". If I set this to "Fly Over + # Point" and then save the mission in the ME DCS resets it. waypoint.alt_type = self.waypoint.alt_type tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)