Created
December 23, 2013 14:04
-
-
Save kahrl/8097603 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/particles.cpp b/src/particles.cpp | |
index 88905d4..ce5a401 100644 | |
--- a/src/particles.cpp | |
+++ b/src/particles.cpp | |
@@ -221,7 +221,7 @@ void allparticles_step (float dtime, ClientEnvironment &env) | |
{ | |
(*i)->remove(); | |
delete *i; | |
- all_particles.erase(i); | |
+ i = all_particles.erase(i); | |
} | |
else | |
{ | |
@@ -375,7 +375,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment &env) | |
m_texture, | |
v2f(0.0, 0.0), | |
v2f(1.0, 1.0)); | |
- m_spawntimes.erase(i); | |
+ i = m_spawntimes.erase(i); | |
} | |
else | |
{ | |
@@ -462,6 +462,6 @@ void clear_particles () | |
{ | |
(*i)->remove(); | |
delete *i; | |
- all_particles.erase(i); | |
- } | |
+ i = all_particles.erase(i); | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment