diff options
-rw-r--r-- | world.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -53,6 +53,9 @@ Deathzone* inst_deathzone( void update_world(World* w, const App* a) { int i; + for (i = w->deathzone_count - 1; i >= 0; i--) + 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])) @@ -60,9 +63,6 @@ void update_world(World* w, const App* a) { for (i = w->enemy_count - 1; i >= 0; i--) if (update_enemy(&w->enemies[i], w)) w->enemies[i] = w->enemies[--w->enemy_count]; - for (i = w->deathzone_count - 1; i >= 0; i--) - if (update_deathzone(&w->deathzones[i])) - w->deathzones[i] = w->deathzones[--w->deathzone_count]; } void ren_world(const World* w, struct Renderer* r) { |