Skip to content

Commit

Permalink
Drop remaining explosions just after quitting
Browse files Browse the repository at this point in the history
  • Loading branch information
atupone committed Apr 28, 2024
1 parent 2e24cf4 commit 9647e26
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bzflag/playing.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3728,6 +3728,13 @@ static void updateExplosions(float dt)
}
}

static void dropLastExplosions()
{
for (auto explosion : explosions)
delete explosion;
explosions.clear();
}

static void addExplosions(SceneDatabase* scene)
{
const int count = explosions.size();
Expand Down Expand Up @@ -7486,6 +7493,8 @@ static void playingLoop()
doMessages();

} // end main client loop

dropLastExplosions();
}


Expand Down

0 comments on commit 9647e26

Please sign in to comment.