From fe658eb877766ffaf8115d37eebd2fddcf2d0245 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 11 Dec 2020 19:01:35 -0800 Subject: [PATCH] Always aim the carrier into the wind. https://github.com/Khopa/dcs_liberation/issues/543 (cherry picked from commit 8443f61f0ae0e2e3a3035e41198235d42af9235f) --- gen/groundobjectsgen.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gen/groundobjectsgen.py b/gen/groundobjectsgen.py index 5c3b7aa0..3e16b11a 100644 --- a/gen/groundobjectsgen.py +++ b/gen/groundobjectsgen.py @@ -204,10 +204,11 @@ class GenericCarrierGenerator(GenericGroundObjectGenerator): tacan_callsign = self.tacan_callsign() icls = next(self.icls_alloc) - if self.control_point.target_position is not None: - brc = self.steam_to_target_position(ship_group) - else: - brc = self.steam_into_wind(ship_group) + # Always steam into the wind, even if the carrier is being moved. + # There are multiple unsimulated hours between turns, so we can + # count those as the time the carrier uses to move and the mission + # time as the recovery window. + brc = self.steam_into_wind(ship_group) self.activate_beacons(ship_group, tacan, tacan_callsign, icls) self.add_runway_data(brc or 0, atc, tacan, tacan_callsign, icls) self._register_unit_group(group, ship_group) @@ -251,10 +252,6 @@ class GenericCarrierGenerator(GenericGroundObjectGenerator): return brc return None - def steam_to_target_position(self, group: ShipGroup) -> Optional[int]: - group.add_waypoint(self.control_point.target_position) - return group.position.heading_between_point(self.control_point.target_position) - def tacan_callsign(self) -> str: raise NotImplementedError