diff options
author | Kahrl <kahrl@gmx.net> | 2013-12-23 15:11:53 +0100 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2013-12-23 15:11:53 +0100 |
commit | a5377251e213803f61752594b7b52d31ac410bb2 (patch) | |
tree | 5216b35e0e06ae9da516341b9f4532aadbf3ec19 /src | |
parent | a58b47d0f6f9b0838a16d8316b2b33c832820d80 (diff) | |
download | minetest-a5377251e213803f61752594b7b52d31ac410bb2.tar.gz minetest-a5377251e213803f61752594b7b52d31ac410bb2.tar.bz2 minetest-a5377251e213803f61752594b7b52d31ac410bb2.zip |
Fix particle code ignoring return value of std::vector::erase(). Wat.
Diffstat (limited to 'src')
-rw-r--r-- | src/particles.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/particles.cpp b/src/particles.cpp index 88905d40d..ce5a4013f 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); + } } |