summaryrefslogtreecommitdiff
path: root/src/particle/rotationalparticle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-16 21:12:23 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-16 21:12:23 +0300
commitb08de2d689c845c740fd25294bf93adf226fdb97 (patch)
tree3cc6b33808e3e707dfd2830f39e1767eff4f6f6f /src/particle/rotationalparticle.cpp
parent558ef7174653df9d435e818bf16130443b0dd5be (diff)
downloadmanaverse-b08de2d689c845c740fd25294bf93adf226fdb97.tar.gz
manaverse-b08de2d689c845c740fd25294bf93adf226fdb97.tar.bz2
manaverse-b08de2d689c845c740fd25294bf93adf226fdb97.tar.xz
manaverse-b08de2d689c845c740fd25294bf93adf226fdb97.zip
Move animation field from child particles classes into Particle.
Diffstat (limited to 'src/particle/rotationalparticle.cpp')
-rw-r--r--src/particle/rotationalparticle.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/particle/rotationalparticle.cpp b/src/particle/rotationalparticle.cpp
index 1fa9f93b9..a52e0ca4b 100644
--- a/src/particle/rotationalparticle.cpp
+++ b/src/particle/rotationalparticle.cpp
@@ -24,32 +24,29 @@
#include "resources/animation/simpleanimation.h"
-#include "utils/delete2.h"
-
#include "debug.h"
static const double PI = M_PI;
static const float PI2 = 2 * M_PI;
RotationalParticle::RotationalParticle(Animation *restrict const animation) :
- ImageParticle(nullptr),
- mAnimation(new SimpleAnimation(animation))
+ ImageParticle(nullptr)
{
mType = ParticleType::Rotational;
+ mAnimation = new SimpleAnimation(animation);
}
RotationalParticle::RotationalParticle(const XmlNodePtr animationNode,
const std::string &restrict
dyePalettes) :
- ImageParticle(nullptr),
- mAnimation(new SimpleAnimation(animationNode, dyePalettes))
+ ImageParticle(nullptr)
{
mType = ParticleType::Rotational;
+ mAnimation = new SimpleAnimation(animationNode, dyePalettes);
}
RotationalParticle::~RotationalParticle()
{
- delete2(mAnimation);
mImage = nullptr;
}