summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 035882b6..6f66b632 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -237,9 +237,44 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *
}
}
+ParticleEmitter::ParticleEmitter(const ParticleEmitter &o)
+{
+ *this = o;
+}
+
+ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o)
+{
+ mParticlePosX = o.mParticlePosX;
+ mParticlePosY = o.mParticlePosY;
+ mParticlePosZ = o.mParticlePosZ;
+ mParticleAngleHorizontal = o.mParticleAngleHorizontal;
+ mParticleAngleVertical = o.mParticleAngleVertical;
+ mParticlePower = o.mParticlePower;
+ mParticleGravity = o.mParticleGravity;
+ mParticleRandomnes = o.mParticleRandomnes;
+ mParticleBounce = o.mParticleBounce;
+ mParticleTarget = o.mParticleTarget;
+ mParticleAcceleration = o.mParticleAcceleration;
+ mParticleDieDistance = o.mParticleDieDistance;
+ mParticleMomentum = o.mParticleMomentum;
+ mParticleLifetime = o.mParticleLifetime;
+ mParticleFadeOut = o.mParticleFadeOut;
+ mParticleFadeIn = o.mParticleFadeIn;
+ mMap = o.mMap;
+ mOutput = o.mOutput;
+ mParticleImage = o.mParticleImage;
+ mParticleAnimation = o.mParticleAnimation;
+ mParticleChildEmitters = o.mParticleChildEmitters;
+
+ if (mParticleImage) mParticleImage->incRef();
+
+ return *this;
+}
+
ParticleEmitter::~ParticleEmitter()
{
+ if (mParticleImage) mParticleImage->decRef();
}