Start sim if needed.

This used to be accidentally performed by the pause function. That's no
longer done, so start if needed.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2098.
This commit is contained in:
Dan Albert 2022-03-20 00:02:51 -07:00
parent 8dddffb8b5
commit 2c041081c9

View File

@ -54,12 +54,16 @@ class GameLoop:
def run_to_first_contact(self) -> None:
self.pause()
if not self.started:
self.start()
logging.info("Running sim to first contact")
while not self.completed:
self.tick(suppress_events=True)
def pause_and_generate_miz(self, output: Path) -> None:
self.pause()
if not self.started:
self.start()
self.sim.generate_miz(output)
def pause_and_debrief(self, state_path: Path, force_end: bool) -> Debriefing: