summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-05-04 00:41:52 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-05-04 00:41:52 +0200
commit1690ecb3e05e9667c6876939a338a8856bb21096 (patch)
tree52c560c02d92a1eb363fa3f0f8fd93100b806ea9 /src/being.cpp
parentf4e01badebdc5975c9ded35a93f7ac501e4f73c8 (diff)
downloadmana-client-1690ecb3e05e9667c6876939a338a8856bb21096.tar.gz
mana-client-1690ecb3e05e9667c6876939a338a8856bb21096.tar.bz2
mana-client-1690ecb3e05e9667c6876939a338a8856bb21096.tar.xz
mana-client-1690ecb3e05e9667c6876939a338a8856bb21096.zip
Fixed crash when no weapon is equipped and fixed height of arrow target
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp
index fc61fbd9..ab3860a0 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -475,10 +475,11 @@ void Being::handleAttack(Being *victim, int damage, AttackType type)
#ifdef EATHENA_SUPPORT
if (getType() == PLAYER)
{
- if (mEquippedWeapon->getAttackType() == ACTION_ATTACK_BOW)
+ if (mEquippedWeapon && mEquippedWeapon->getAttackType() == ACTION_ATTACK_BOW)
{
Particle *p = new Particle(NULL);
p->setLifetime(1000);
+ p->moveBy(Vector(0.0f, 0.0f, 32.0f));
victim->controlParticle(p);
Particle *p2 = particleEngine->addEffect("graphics/particles/arrow.particle.xml", mPx, mPy);