diff options
-rw-r--r-- | world.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -73,6 +73,9 @@ void update_world(World* w, const App* a) { int i; if (w->laser.life) update_laser(&w->laser); + for (i = w->particle_count - 1; i >= 0; i--) + if (update_particle(&w->particles[i])) + w->particles[i] = w->particles[--w->particle_count]; if (w->freeze) { w->freeze--; return; @@ -81,9 +84,6 @@ void update_world(World* w, const App* a) { if (update_deathzone(&w->deathzones[i])) w->deathzones[i] = w->deathzones[--w->deathzone_count]; update_player(&w->player, w, a, &w->map); - for (i = w->particle_count - 1; i >= 0; i--) - if (update_particle(&w->particles[i])) - w->particles[i] = w->particles[--w->particle_count]; for (i = w->effect_count - 1; i >= 0; i--) if (update_effect(&w->effects[i])) w->effects[i] = w->effects[--w->effect_count]; |