mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Use stacking algorithm in "_generate_over_departure"
Resolves #57 "_generate_over_departure" is the method used to generate flights in the air when no more parking spots are available. Pydcs changes were required as it turned out aircraft were trying to spawn on helicopter parking spots, which forces them to start in the air by DCS itself.
This commit is contained in:
parent
9ddaf50ad4
commit
37f2e5bf3a
@ -135,7 +135,6 @@ class FlightGroupSpawner:
|
||||
"No room on runway or parking slots. Starting from the air."
|
||||
)
|
||||
group = self._generate_over_departure(name, cp)
|
||||
group.points[0].alt = 1500
|
||||
return group
|
||||
|
||||
def generate_mid_mission(self) -> FlyingGroup[Any]:
|
||||
@ -208,7 +207,11 @@ class FlightGroupSpawner:
|
||||
elif self.flight.unit_type.helicopter:
|
||||
alt = WARM_START_HELI_ALT
|
||||
else:
|
||||
alt = WARM_START_ALTITUDE
|
||||
if origin.id not in self.mission_data.cp_stack:
|
||||
min_alt = MINIMUM_MID_MISSION_SPAWN_ALTITUDE_AGL
|
||||
self.mission_data.cp_stack[origin.id] = min_alt
|
||||
alt = self.mission_data.cp_stack[origin.id]
|
||||
self.mission_data.cp_stack[origin.id] += STACK_SEPARATION
|
||||
|
||||
speed = GroundSpeed.for_flight(self.flight, alt)
|
||||
pos = at + Vector2(random.randint(100, 1000), random.randint(100, 1000))
|
||||
|
||||
@ -31,7 +31,7 @@ platformdirs==2.5.4
|
||||
pluggy==1.0.0
|
||||
pre-commit==2.20.0
|
||||
pydantic==1.10.2
|
||||
-e git+https://github.com/dcs-retribution/pydcs@fb1fefcb32fbab82ac36b8519b87bae32326784e#egg=pydcs
|
||||
-e git+https://github.com/dcs-retribution/pydcs@1016e803396f676471286f928577d97d717352a4#egg=pydcs
|
||||
pyinstaller==5.6.2
|
||||
pyinstaller-hooks-contrib==2022.13
|
||||
pyparsing==3.0.9
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user