diff --git a/core/simulation_engine.py b/core/simulation_engine.py index 6180a43..e9ef2a7 100644 --- a/core/simulation_engine.py +++ b/core/simulation_engine.py @@ -154,6 +154,7 @@ class SimulationEngine: self.world.tick_all() self.tick_counter += 1 self.total_ticks += 1 + pygame.event.pump() # Prevent event queue overflow if time.perf_counter() - current_time > 0.05: break if time.perf_counter() - self.last_tps_time >= 1.0: