From 762c754670c1accb294a9d5c34dfbb32e9cfe960 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Wed, 5 Nov 2008 23:58:27 +0000 Subject: Minor targeting fix (don't count attacking against target timeouts), as well as only calling the target draw update code only when necessary. --- src/localplayer.cpp | 11 ++++++----- 1 file 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); -- cgit v1.2.3-70-g09d2