Prevent event queue overflow by pumping pygame events during simulation ticks
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 1m5s

This commit is contained in:
Sam 2025-06-25 00:09:23 -05:00
parent 15bc179410
commit d0f01c0a48

View File

@ -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: