summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-16 23:57:21 +0100
committerIra Rice <irarice@gmail.com>2009-02-16 18:03:27 -0700
commita739b7d2936bc1074edc4703bd06605162efd166 (patch)
tree0a9bcc26bbb2adbf90e2ee4518cafb4fb4643a10 /src/localplayer.h
parent5964b89cbe0aa78768a6abfe37eafe70f50a3222 (diff)
downloadmana-client-a739b7d2936bc1074edc4703bd06605162efd166.tar.gz
mana-client-a739b7d2936bc1074edc4703bd06605162efd166.tar.bz2
mana-client-a739b7d2936bc1074edc4703bd06605162efd166.tar.xz
mana-client-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.h')
-rw-r--r--src/localplayer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 0ba0dd90..b368d7c1 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -141,8 +141,6 @@ class LocalPlayer : public Player
void stopAttack();
- Being* getTarget() const;
-
/**
* Overridden to do nothing. The attacks of the local player are
* displayed as soon as the player attacks, not when the server says
@@ -154,6 +152,12 @@ class LocalPlayer : public Player
virtual void handleAttack(Being *victim, int damage) {}
/**
+ * Returns the current target of the player. Returns 0 if no being is
+ * currently targeted.
+ */
+ Being* getTarget() const;
+
+ /**
* Sets the target being of the player.
*/
void setTarget(Being* target);