From 0c792db05c9e53a2e5dd7f6462f8aaa561fde858 Mon Sep 17 00:00:00 2001 From: obneq Date: Sun, 5 Apr 2015 22:02:01 +0200 Subject: fix infinite spawners --- src/particles.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/particles.cpp b/src/particles.cpp index b13e904b0..15e2a6597 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -308,7 +308,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment* env) *(m_maxsize-m_minsize) +m_minsize; - new Particle( + Particle* toadd = new Particle( m_gamedef, m_smgr, m_player, @@ -323,6 +323,7 @@ void ParticleSpawner::step(float dtime, ClientEnvironment* env) m_texture, v2f(0.0, 0.0), v2f(1.0, 1.0)); + m_particlemanager->addParticle(toadd); } } } -- cgit v1.2.3