player turn awaits empty particle queue

This commit is contained in:
Llywelwyn 2023-08-30 05:58:08 +01:00
parent b5c4cb1fb5
commit 8eb98b5baa

View file

@ -246,6 +246,7 @@ impl GameState for State {
new_runstate = RunState::AwaitingInput;
}
RunState::AwaitingInput => {
while particle_system::check_queue(&self.ecs) {
// We refresh the index, and run anything that might
// still be in the queue, just to make 100% sure that
// there are no lingering effects from the last tick.
@ -268,6 +269,7 @@ impl GameState for State {
new_runstate = RunState::Ticking;
}
}
}
RunState::Ticking => {
while new_runstate == RunState::Ticking && particle_system::check_queue(&self.ecs) {
self.run_systems();