mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fixed not all generated flights getting inserted into Pretense data structures.
This commit is contained in:
parent
7653866ddb
commit
1bcecd5b3a
@ -556,9 +556,9 @@ class PretenseAircraftGenerator:
|
|||||||
StartType.COLD,
|
StartType.COLD,
|
||||||
divert=cp,
|
divert=cp,
|
||||||
)
|
)
|
||||||
for pilot in flight.roster.pilots:
|
for roster_pilot in flight.roster.pilots:
|
||||||
if pilot is not None:
|
if roster_pilot is not None:
|
||||||
pilot.player = True
|
roster_pilot.player = True
|
||||||
print(
|
print(
|
||||||
f"Generated flight for {squadron.primary_task} flying {squadron.aircraft.name} at {squadron.location.name}. Pilot client count: {flight.client_count}"
|
f"Generated flight for {squadron.primary_task} flying {squadron.aircraft.name} at {squadron.location.name}. Pilot client count: {flight.client_count}"
|
||||||
)
|
)
|
||||||
|
|||||||
@ -128,6 +128,10 @@ class PretenseFlightGroupSpawner(FlightGroupSpawner):
|
|||||||
if pad_group is not None:
|
if pad_group is not None:
|
||||||
return pad_group
|
return pad_group
|
||||||
if cp.has_ground_spawns and (self.flight.client_count > 0 or is_heli):
|
if cp.has_ground_spawns and (self.flight.client_count > 0 or is_heli):
|
||||||
|
if self.flight.client_count == 0:
|
||||||
|
self.flight.coalition.game.pretense_air[cp_side][
|
||||||
|
cp_name_trimmed
|
||||||
|
][self.flight.flight_type].append(name)
|
||||||
pad_group = self._generate_at_cp_ground_spawn(name, cp)
|
pad_group = self._generate_at_cp_ground_spawn(name, cp)
|
||||||
if pad_group is not None:
|
if pad_group is not None:
|
||||||
return pad_group
|
return pad_group
|
||||||
@ -139,6 +143,10 @@ class PretenseFlightGroupSpawner(FlightGroupSpawner):
|
|||||||
elif isinstance(cp, Airfield):
|
elif isinstance(cp, Airfield):
|
||||||
is_heli = self.flight.squadron.aircraft.helicopter
|
is_heli = self.flight.squadron.aircraft.helicopter
|
||||||
if cp.has_helipads and is_heli:
|
if cp.has_helipads and is_heli:
|
||||||
|
if self.flight.client_count == 0:
|
||||||
|
self.flight.coalition.game.pretense_air[cp_side][
|
||||||
|
cp_name_trimmed
|
||||||
|
][self.flight.flight_type].append(name)
|
||||||
pad_group = self._generate_at_cp_helipad(name, cp)
|
pad_group = self._generate_at_cp_helipad(name, cp)
|
||||||
if pad_group is not None:
|
if pad_group is not None:
|
||||||
return pad_group
|
return pad_group
|
||||||
@ -149,6 +157,10 @@ class PretenseFlightGroupSpawner(FlightGroupSpawner):
|
|||||||
>= self.flight.count
|
>= self.flight.count
|
||||||
and (self.flight.client_count > 0 or is_heli)
|
and (self.flight.client_count > 0 or is_heli)
|
||||||
):
|
):
|
||||||
|
if self.flight.client_count == 0:
|
||||||
|
self.flight.coalition.game.pretense_air[cp_side][
|
||||||
|
cp_name_trimmed
|
||||||
|
][self.flight.flight_type].append(name)
|
||||||
pad_group = self._generate_at_cp_ground_spawn(name, cp)
|
pad_group = self._generate_at_cp_ground_spawn(name, cp)
|
||||||
if pad_group is not None:
|
if pad_group is not None:
|
||||||
return pad_group
|
return pad_group
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user