aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--world.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/world.c b/world.c
index 1881df2..94aa1c7 100644
--- a/world.c
+++ b/world.c
@@ -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];