Adjust 'should_halt_sim' conditions for taxi & takeoff flight-states, fixing an infinite loop that would occur if the FF-interrupt setting would not match with the start-type of the flight
This commit is contained in:
Raffson 2023-08-19 15:13:44 +02:00
parent 4901443b7a
commit 8a6b7b172c
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
3 changed files with 5 additions and 4 deletions

View File

@ -45,7 +45,8 @@ class Takeoff(AtDeparture):
def should_halt_sim(self) -> bool:
if (
self.flight.client_count > 0
and self.settings.player_mission_interrupts_sim_at is StartType.RUNWAY
and self.settings.player_mission_interrupts_sim_at
is [StartType.COLD, StartType.WARM, StartType.RUNWAY]
):
logging.info(
f"Interrupting simulation because {self.flight} has players and has "

View File

@ -37,7 +37,8 @@ class Taxi(AtDeparture):
def should_halt_sim(self) -> bool:
if (
self.flight.client_count > 0
and self.settings.player_mission_interrupts_sim_at is StartType.WARM
and self.settings.player_mission_interrupts_sim_at
in [StartType.COLD, StartType.WARM]
):
logging.info(
f"Interrupting simulation because {self.flight} has players and has "

View File

@ -536,9 +536,8 @@ class Settings:
"Player missions interrupt fast forward",
page=MISSION_GENERATOR_PAGE,
section=GAMEPLAY_SECTION,
default=None,
default=StartType.COLD,
choices={
"Never": None,
"At startup time": StartType.COLD,
"At taxi time": StartType.WARM,
"At takeoff time": StartType.RUNWAY,