summaryrefslogtreecommitdiff
path: root/src/imageparticle.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <mana@crushnet.org>2010-10-17 17:15:21 +0200
committerPhilipp Sehmisch <mana@crushnet.org>2010-10-17 17:15:21 +0200
commit1b21442b5eb6dcc41a585715d07c73ed3ad59a1b (patch)
treec84f226695e1d7bb7d95fcba7c9e8c30333508da /src/imageparticle.cpp
parent1f3c056323de16cbe5965e1d65a69eeab73396ce (diff)
downloadmana-1b21442b5eb6dcc41a585715d07c73ed3ad59a1b.tar.gz
mana-1b21442b5eb6dcc41a585715d07c73ed3ad59a1b.tar.bz2
mana-1b21442b5eb6dcc41a585715d07c73ed3ad59a1b.tar.xz
mana-1b21442b5eb6dcc41a585715d07c73ed3ad59a1b.zip
Added death effects to particle engine.
Every particle can now have a death effect. This is an effect which is created when the particle dies. Which death reasons (timeout, touching floor, touching sky, reaching target or deleted by external call) trigger the effect can also be specified. This is useful for exploding projectiles and many other effects. Reviewed-by: Bertram
Diffstat (limited to 'src/imageparticle.cpp')
-rw-r--r--src/imageparticle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp
index 76c05d64..2900239f 100644
--- a/src/imageparticle.cpp
+++ b/src/imageparticle.cpp
@@ -41,7 +41,7 @@ ImageParticle::~ImageParticle()
bool ImageParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
{
- if (!mAlive || !mImage)
+ if (!isAlive() || !mImage)
return false;
int screenX = (int) mPos.x + offsetX - mImage->getWidth() / 2;