summaryrefslogtreecommitdiff
path: root/src/particle/particleemitter.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-18 18:42:51 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:21 +0300
commit2033ce76a8fba2148bc034d16e1d226bc757c47f (patch)
tree08a53fde19959fc72c09c42b457f63d63aba291d /src/particle/particleemitter.cpp
parente441e9e40d27930f3533ffecfa2a48e4fd312f4c (diff)
downloadmv-2033ce76a8fba2148bc034d16e1d226bc757c47f.tar.gz
mv-2033ce76a8fba2148bc034d16e1d226bc757c47f.tar.bz2
mv-2033ce76a8fba2148bc034d16e1d226bc757c47f.tar.xz
mv-2033ce76a8fba2148bc034d16e1d226bc757c47f.zip
remove virtual methos call from particle constructor.
Diffstat (limited to 'src/particle/particleemitter.cpp')
-rw-r--r--src/particle/particleemitter.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp
index 089fa31de..bddd43f54 100644
--- a/src/particle/particleemitter.cpp
+++ b/src/particle/particleemitter.cpp
@@ -584,21 +584,25 @@ std::list<Particle *> ParticleEmitter::createParticles(const int tick)
if (ImageParticle::imageParticleCountByName[name] > 200)
break;
- newParticle = new ImageParticle(mMap, mParticleImage);
+ newParticle = new ImageParticle(mParticleImage);
+ newParticle->setMap(mMap);
}
else if (!mParticleRotation.mFrames.empty())
{
Animation *const newAnimation = new Animation(mParticleRotation);
- newParticle = new RotationalParticle(mMap, newAnimation);
+ newParticle = new RotationalParticle(newAnimation);
+ newParticle->setMap(mMap);
}
else if (!mParticleAnimation.mFrames.empty())
{
Animation *const newAnimation = new Animation(mParticleAnimation);
- newParticle = new AnimationParticle(mMap, newAnimation);
+ newParticle = new AnimationParticle(newAnimation);
+ newParticle->setMap(mMap);
}
else
{
- newParticle = new Particle(mMap);
+ newParticle = new Particle();
+ newParticle->setMap(mMap);
}
const Vector position(mParticlePosX.value(tick),