From 91ee1c7b3e861d84c8aae51ad933ff6015adb5b8 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 16 Feb 2009 23:57:21 +0100 Subject: Don't arbitrarily unset player target on NPC deletion When an NPC got deleted it would reset the player target. I'm assuming what was meant was to reset the target when the deleted NPC was the target. --- src/localplayer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 2487ab54..70e42f88 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -329,6 +329,11 @@ void LocalPlayer::walk(unsigned char dir) } } +Being* LocalPlayer::getTarget() const +{ + return mTarget; +} + void LocalPlayer::setTarget(Being *target) { if (mLastTarget != -1 || target == this) @@ -563,11 +568,6 @@ void LocalPlayer::stopAttack() mLastTarget = -1; } -Being* LocalPlayer::getTarget() const -{ - return mTarget; -} - void LocalPlayer::revive() { MessageOut outMsg(mNetwork); -- cgit v1.2.3-70-g09d2