diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 40592f59..7bf339c6 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -736,14 +736,23 @@ void LocalPlayer::setTarget(Being *target) mTargetTime = -1; } + Being *oldTarget = 0; if (mTarget) + { mTarget->untarget(); + oldTarget = mTarget; + } if (mTarget && mTarget->getType() == ActorSprite::MONSTER) mTarget->setShowName(false); mTarget = target; + if (oldTarget) + oldTarget->updateName(); + if (mTarget) + mTarget->updateName(); + if (target && target->getType() == ActorSprite::MONSTER) target->setShowName(true); } |