mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
AGL to AMSL option for naval waypoints
Introduce an option to switch waypoints to AMSL when waypoint is above water. DCS references the bottom of the sea when using AGL, which causes issues for helicopters when they try to fly at altitudes that are lower that the sea bottom, giving them a tendency to fly into the water...
This commit is contained in:
parent
696e2dbbe8
commit
e85d1e8ca2
@ -39,6 +39,7 @@
|
|||||||
* **[New Game Wizard]** Campaign errors show a dialog again and avoid CTDs
|
* **[New Game Wizard]** Campaign errors show a dialog again and avoid CTDs
|
||||||
* **[UI]** Landmap wasn't updating when switching to a different theater
|
* **[UI]** Landmap wasn't updating when switching to a different theater
|
||||||
* **[Mission Results Processor]** Squadrons of a sunken carrier are now disbanded
|
* **[Mission Results Processor]** Squadrons of a sunken carrier are now disbanded
|
||||||
|
* **[Mission Generation]** Introduced option to switch alt-type to AMSL during mission generation to avoid helicopters wanting to submerge over certain parts of the sea.
|
||||||
|
|
||||||
# Retribution v1.3.1
|
# Retribution v1.3.1
|
||||||
#### Note: Re-save your missions in DCS' Mission Editor to avoid possible crashes due to datalink (usually the case when F-16C blk50s are used) when hosting missions on a dedicated server.
|
#### Note: Re-save your missions in DCS' Mission Editor to avoid possible crashes due to datalink (usually the case when F-16C blk50s are used) when hosting missions on a dedicated server.
|
||||||
|
|||||||
@ -65,6 +65,9 @@ class PydcsWaypointBuilder:
|
|||||||
name=self.dcs_name_for_waypoint(),
|
name=self.dcs_name_for_waypoint(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
waypoint.alt_type = self.waypoint.alt_type
|
||||||
|
if self.flight.is_helo and self.flight.coalition.game.settings.switch_baro_fix:
|
||||||
|
self.switch_to_baro_if_in_sea(waypoint)
|
||||||
if self.waypoint.flyover:
|
if self.waypoint.flyover:
|
||||||
waypoint.action = PointAction.FlyOverPoint
|
waypoint.action = PointAction.FlyOverPoint
|
||||||
# It seems we need to leave waypoint.type exactly as it is even
|
# It seems we need to leave waypoint.type exactly as it is even
|
||||||
@ -75,13 +78,19 @@ class PydcsWaypointBuilder:
|
|||||||
waypoint.alt = 0
|
waypoint.alt = 0
|
||||||
waypoint.alt_type = "RADIO"
|
waypoint.alt_type = "RADIO"
|
||||||
|
|
||||||
waypoint.alt_type = self.waypoint.alt_type
|
|
||||||
tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)
|
tot = self.flight.flight_plan.tot_for_waypoint(self.waypoint)
|
||||||
if tot is not None:
|
if tot is not None:
|
||||||
self.set_waypoint_tot(waypoint, tot)
|
self.set_waypoint_tot(waypoint, tot)
|
||||||
self.add_tasks(waypoint)
|
self.add_tasks(waypoint)
|
||||||
return waypoint
|
return waypoint
|
||||||
|
|
||||||
|
def switch_to_baro_if_in_sea(self, waypoint: MovingPoint) -> None:
|
||||||
|
if (
|
||||||
|
waypoint.alt_type == "RADIO"
|
||||||
|
and self.flight.coalition.game.theater.is_in_sea(waypoint.position)
|
||||||
|
):
|
||||||
|
waypoint.alt_type = "BARO"
|
||||||
|
|
||||||
def ai_despawn(
|
def ai_despawn(
|
||||||
self, waypoint: MovingPoint, ignore_landing_wpt: bool = False
|
self, waypoint: MovingPoint, ignore_landing_wpt: bool = False
|
||||||
) -> bool:
|
) -> bool:
|
||||||
|
|||||||
@ -798,7 +798,7 @@ class Settings:
|
|||||||
section=GAMEPLAY_SECTION,
|
section=GAMEPLAY_SECTION,
|
||||||
choices={v.value: v for v in StartType},
|
choices={v.value: v for v in StartType},
|
||||||
default=StartType.COLD,
|
default=StartType.COLD,
|
||||||
detail=("Default start type for flights containing Player/Client slots."),
|
detail="Default start type for flights containing Player/Client slots.",
|
||||||
)
|
)
|
||||||
nevatim_parking_fix: bool = boolean_option(
|
nevatim_parking_fix: bool = boolean_option(
|
||||||
"Force air-starts for aircraft at Nevatim and Ramon Airbase inoperable parking slots",
|
"Force air-starts for aircraft at Nevatim and Ramon Airbase inoperable parking slots",
|
||||||
@ -810,6 +810,16 @@ class Settings:
|
|||||||
"which are known to work as of DCS World 2.9.4.53990."
|
"which are known to work as of DCS World 2.9.4.53990."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
switch_baro_fix: bool = boolean_option(
|
||||||
|
"Switch altitude type of waypoints to AMSL above seas for helicopters",
|
||||||
|
page=MISSION_GENERATOR_PAGE,
|
||||||
|
section=GAMEPLAY_SECTION,
|
||||||
|
default=True, # TODO: set to False or remove this when DCS is fixed?
|
||||||
|
detail=(
|
||||||
|
"AGL seems to reference the bottom of the sea which causes issues for helicopters"
|
||||||
|
" trying to fly at altitudes lower than the sea-bottom."
|
||||||
|
),
|
||||||
|
)
|
||||||
limit_ai_radios: bool = boolean_option(
|
limit_ai_radios: bool = boolean_option(
|
||||||
"Limit AI radio callouts",
|
"Limit AI radio callouts",
|
||||||
page=MISSION_GENERATOR_PAGE,
|
page=MISSION_GENERATOR_PAGE,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user