mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
In-Flight spawn: Minimum AGL altitude (#2302)
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2212
This commit is contained in:
parent
ec425501cd
commit
746eda70ee
@ -29,7 +29,8 @@ WARM_START_ALTITUDE = meters(3000)
|
|||||||
# PG at 5700ft. This could still be too low if there are tall obstacles near the
|
# PG at 5700ft. This could still be too low if there are tall obstacles near the
|
||||||
# airfield, but the lowest we can push this the better to avoid spawning helicopters
|
# airfield, but the lowest we can push this the better to avoid spawning helicopters
|
||||||
# well above the altitude for WP1.
|
# well above the altitude for WP1.
|
||||||
MINIMUM_MID_MISSION_SPAWN_ALTITUDE = feet(6000)
|
MINIMUM_MID_MISSION_SPAWN_ALTITUDE_MSL = feet(6000)
|
||||||
|
MINIMUM_MID_MISSION_SPAWN_ALTITUDE_AGL = feet(500)
|
||||||
|
|
||||||
RTB_ALTITUDE = meters(800)
|
RTB_ALTITUDE = meters(800)
|
||||||
RTB_DISTANCE = 5000
|
RTB_DISTANCE = 5000
|
||||||
@ -139,8 +140,13 @@ class FlightGroupSpawner:
|
|||||||
# We don't know where the ground is, so just make sure that any aircraft
|
# We don't know where the ground is, so just make sure that any aircraft
|
||||||
# spawning at an MSL altitude is spawned at some minimum altitude.
|
# spawning at an MSL altitude is spawned at some minimum altitude.
|
||||||
# https://github.com/dcs-liberation/dcs_liberation/issues/1941
|
# https://github.com/dcs-liberation/dcs_liberation/issues/1941
|
||||||
if alt_type == "BARO" and alt < MINIMUM_MID_MISSION_SPAWN_ALTITUDE:
|
if alt_type == "BARO" and alt < MINIMUM_MID_MISSION_SPAWN_ALTITUDE_MSL:
|
||||||
alt = MINIMUM_MID_MISSION_SPAWN_ALTITUDE
|
alt = MINIMUM_MID_MISSION_SPAWN_ALTITUDE_MSL
|
||||||
|
|
||||||
|
# Set a minimum AGL value for 'alt' if needed,
|
||||||
|
# otherwise planes might crash in trees and stuff.
|
||||||
|
if alt_type == "RADIO" and alt < MINIMUM_MID_MISSION_SPAWN_ALTITUDE_AGL:
|
||||||
|
alt = MINIMUM_MID_MISSION_SPAWN_ALTITUDE_AGL
|
||||||
|
|
||||||
group = self.mission.flight_group(
|
group = self.mission.flight_group(
|
||||||
country=self.country,
|
country=self.country,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user