diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-16 23:57:21 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-16 18:03:27 -0700 |
commit | a739b7d2936bc1074edc4703bd06605162efd166 (patch) | |
tree | 0a9bcc26bbb2adbf90e2ee4518cafb4fb4643a10 /src/localplayer.cpp | |
parent | 5964b89cbe0aa78768a6abfe37eafe70f50a3222 (diff) | |
download | mana-a739b7d2936bc1074edc4703bd06605162efd166.tar.gz mana-a739b7d2936bc1074edc4703bd06605162efd166.tar.bz2 mana-a739b7d2936bc1074edc4703bd06605162efd166.tar.xz mana-a739b7d2936bc1074edc4703bd06605162efd166.zip |
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.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index b8703b70..a719e265 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -328,6 +328,11 @@ void LocalPlayer::walk(unsigned char dir) } } +Being* LocalPlayer::getTarget() const +{ + return mTarget; +} + void LocalPlayer::setTarget(Being *target) { if (mLastTarget != -1 || target == this) @@ -565,11 +570,6 @@ void LocalPlayer::stopAttack() mLastTarget = -1; } -Being* LocalPlayer::getTarget() const -{ - return mTarget; -} - void LocalPlayer::revive() { MessageOut outMsg(mNetwork); |