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
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 1m5s
This commit is contained in:
parent
15bc179410
commit
d0f01c0a48
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user