mirror of
https://github.com/minetest/minetest.git
synced 2024-11-24 00:23:46 +01:00
Fix particle code ignoring return value of std::vector::erase(). Wat.
This commit is contained in:
parent
a58b47d0f6
commit
a5377251e2
@ -221,7 +221,7 @@ void allparticles_step (float dtime, ClientEnvironment &env)
|
|||||||
{
|
{
|
||||||
(*i)->remove();
|
(*i)->remove();
|
||||||
delete *i;
|
delete *i;
|
||||||
all_particles.erase(i);
|
i = all_particles.erase(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -375,7 +375,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment &env)
|
|||||||
m_texture,
|
m_texture,
|
||||||
v2f(0.0, 0.0),
|
v2f(0.0, 0.0),
|
||||||
v2f(1.0, 1.0));
|
v2f(1.0, 1.0));
|
||||||
m_spawntimes.erase(i);
|
i = m_spawntimes.erase(i);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -462,6 +462,6 @@ void clear_particles ()
|
|||||||
{
|
{
|
||||||
(*i)->remove();
|
(*i)->remove();
|
||||||
delete *i;
|
delete *i;
|
||||||
all_particles.erase(i);
|
i = all_particles.erase(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user