diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-03 17:11:25 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-03 17:11:25 -0400 |
commit | a93a723db62ba2ad445b0fff26be5c51aefcda78 (patch) | |
tree | 1d39966d58f3d1c8c948f4719d22146d2373df10 /src/being.cpp | |
parent | 19bf50bbff325024c2ed9ad724aeb6acb39bae39 (diff) | |
download | mana-client-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.gz mana-client-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.bz2 mana-client-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.xz mana-client-a93a723db62ba2ad445b0fff26be5c51aefcda78.zip |
Added rotational particles, and added code to show arrows when a player shoots them.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/being.cpp b/src/being.cpp index d719635b..fc61fbd9 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -470,8 +470,23 @@ void Being::handleAttack() void Being::handleAttack(Being *victim, int damage, AttackType type) #endif { - setAction(Being::ATTACK); + if (this != player_node) + setAction(Being::ATTACK); #ifdef EATHENA_SUPPORT + if (getType() == PLAYER) + { + if (mEquippedWeapon->getAttackType() == ACTION_ATTACK_BOW) + { + Particle *p = new Particle(NULL); + p->setLifetime(1000); + victim->controlParticle(p); + + Particle *p2 = particleEngine->addEffect("graphics/particles/arrow.particle.xml", mPx, mPy); + p2->setLifetime(900); + p2->setDestination(p, 7, 0); + p2->setDieDistance(8); + } + } mFrame = 0; mWalkTime = tick_time; #endif |