diff options
author | Ira Rice <irarice@gmail.com> | 2008-11-05 23:58:27 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-11-05 23:58:27 +0000 |
commit | 762c754670c1accb294a9d5c34dfbb32e9cfe960 (patch) | |
tree | b86fbf7ca889613dd9d81396d972913c045be511 | |
parent | 8828593b7976e48804c132bd249e15d096b3103f (diff) | |
download | mana-762c754670c1accb294a9d5c34dfbb32e9cfe960.tar.gz mana-762c754670c1accb294a9d5c34dfbb32e9cfe960.tar.bz2 mana-762c754670c1accb294a9d5c34dfbb32e9cfe960.tar.xz mana-762c754670c1accb294a9d5c34dfbb32e9cfe960.zip |
Minor targeting fix (don't count attacking against target timeouts), as
well as only calling the target draw update code only when necessary.
-rw-r--r-- | src/localplayer.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index dccd3914..129626f0 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -138,12 +138,12 @@ void LocalPlayer::logic() { attack(mTarget, true); } - } - for (int i = Being::TC_SMALL; i < Being::NUM_TC; i++) - { - player_node->mTargetCursorInRange[i]->update(10); - player_node->mTargetCursorOutRange[i]->update(10); + for (int i = Being::TC_SMALL; i < Being::NUM_TC; i++) + { + player_node->mTargetCursorInRange[i]->update(10); + player_node->mTargetCursorOutRange[i]->update(10); + } } Being::logic(); @@ -480,6 +480,7 @@ void LocalPlayer::attack(Being *target, bool keep) mLastAttackTime = 0; mWalkTime = tick_time; + mTargetTime = tick_time; setAction(ATTACK); |