]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
fix infinite spawners
authorobneq <obbneq@gmail.com>
Sun, 5 Apr 2015 20:02:01 +0000 (22:02 +0200)
committerest31 <MTest31@outlook.com>
Sat, 18 Apr 2015 18:14:34 +0000 (20:14 +0200)
src/particles.cpp

index b13e904b0d98b8356b5a00b6d7e22a815cf664bb..15e2a6597b952bec34dbafcdf9269a25a080599f 100644 (file)
@@ -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);
                        }
                }
        }