diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-05-04 00:41:52 +0200 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-05-04 00:41:52 +0200 |
commit | 1690ecb3e05e9667c6876939a338a8856bb21096 (patch) | |
tree | 52c560c02d92a1eb363fa3f0f8fd93100b806ea9 | |
parent | f4e01badebdc5975c9ded35a93f7ac501e4f73c8 (diff) | |
download | mana-1690ecb3e05e9667c6876939a338a8856bb21096.tar.gz mana-1690ecb3e05e9667c6876939a338a8856bb21096.tar.bz2 mana-1690ecb3e05e9667c6876939a338a8856bb21096.tar.xz mana-1690ecb3e05e9667c6876939a338a8856bb21096.zip |
Fixed crash when no weapon is equipped and fixed height of arrow target
-rw-r--r-- | src/being.cpp | 3 |
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); |