From 1690ecb3e05e9667c6876939a338a8856bb21096 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 4 May 2009 00:41:52 +0200 Subject: Fixed crash when no weapon is equipped and fixed height of arrow target --- src/being.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3-70-g09d2