projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a58b47d
)
Fix particle code ignoring return value of std::vector::erase(). Wat.
author
Kahrl
<kahrl@gmx.net>
Mon, 23 Dec 2013 14:11:53 +0000
(15:11 +0100)
committer
Kahrl
<kahrl@gmx.net>
Mon, 23 Dec 2013 14:11:53 +0000
(15:11 +0100)
src/particles.cpp
patch
|
blob
|
history
diff --git
a/src/particles.cpp
b/src/particles.cpp
index 88905d40d3a6ce91b066f182889a2a735fdea36b..ce5a4013fc5efed6e3907021be289c041879f144 100644
(file)
--- 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);
+ }
}