From 2c041081c94e86ab69313efd8b6bbd7c04d19555 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 20 Mar 2022 00:02:51 -0700 Subject: [PATCH] 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. --- game/sim/gameloop.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game/sim/gameloop.py b/game/sim/gameloop.py index 2f0cfa1f..483b22c8 100644 --- a/game/sim/gameloop.py +++ b/game/sim/gameloop.py @@ -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: