diff options
author | Andrei Karas <akaras@inbox.ru> | 2010-05-24 02:29:28 +0300 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-05-24 12:59:53 -0600 |
commit | 98820e79e786f3d318a45e0f8e6100841530ff50 (patch) | |
tree | 2ea5e02d7320881b523303bd789406ac5fbfc0f8 /src/localplayer.cpp | |
parent | 698620d703fea6d572c967bfa746d475d28f2d81 (diff) | |
download | mana-client-98820e79e786f3d318a45e0f8e6100841530ff50.tar.gz mana-client-98820e79e786f3d318a45e0f8e6100841530ff50.tar.bz2 mana-client-98820e79e786f3d318a45e0f8e6100841530ff50.tar.xz mana-client-98820e79e786f3d318a45e0f8e6100841530ff50.zip |
Show selected target with bold font.
Also fix possible memory corruption.
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
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); } |