From d303b0164b62708b48b9f831ff0e37bddd8eb5e9 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Mon, 27 Oct 2008 05:20:45 +0000 Subject: Added the ability to turn off a target by targeting it again after being targeted. --- src/localplayer.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 440ea636..a16aa685 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -273,12 +273,18 @@ void LocalPlayer::setTarget(Being *target) if (mLastAction != -1) return; mLastAction = tick_time; + mTargetTime = tick_time; if (target == mTarget) { - if (target != NULL) + if (mTarget) { - target->mTargetCursor = NULL; + if (mTarget->getType() == Being::MONSTER) + { + static_cast(mTarget)->showName(false); + } + mTarget->mTargetCursor = NULL; + mTarget = NULL; } return; } @@ -580,6 +586,7 @@ void LocalPlayer::loadTargetCursor(std::string filename, int width, int height, void LocalPlayer::drawTargetCursor(Graphics *graphics, int scrollX, int scrollY) { + // Draw target marker if needed if (mTarget) { -- cgit v1.2.3-70-g09d2