summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp11
1 files changed, 9 insertions, 2 deletions
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<Monster *>(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)
{