From 98820e79e786f3d318a45e0f8e6100841530ff50 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 24 May 2010 02:29:28 +0300 Subject: Show selected target with bold font. Also fix possible memory corruption. Signed-off-by: Jared Adams --- src/localplayer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/localplayer.cpp') 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); } -- cgit v1.2.3-70-g09d2