diff options
-rw-r--r-- | src/gui/widgets/browserbox.h | 2 | ||||
-rw-r--r-- | src/localplayer.cpp | 11 | ||||
-rw-r--r-- | src/localplayer.h | 3 |
3 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index 42af5b11..c5ca351d 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -126,7 +126,7 @@ class BrowserBox : public gcn::Widget, public gcn::MouseListener PINK = 0xff00d8, /**< Color 6 */ PURPLE = 0x8415e2, /**< Color 7 */ GRAY = 0x919191, /**< Color 8 */ - BROWN = 0x8e4c17, /**< Color 9 */ + BROWN = 0x8e4c17 /**< Color 9 */ }; /** diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 238af129..765c9bd2 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -225,6 +225,17 @@ void LocalPlayer::logic() Player::logic(); } +void LocalPlayer::setAction(Action action, int attackType) +{ + if (action == DEAD) + { + mLastTarget = -1; + setTarget(NULL); + } + + Player::setAction(action, attackType); +} + void LocalPlayer::setGM() { mIsGM = !mIsGM; diff --git a/src/localplayer.h b/src/localplayer.h index b7d39a4c..55e4e6f6 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -154,6 +154,8 @@ class LocalPlayer : public Player virtual void logic(); + virtual void setAction(Action action, int attackType = 0); + /** * Adds a new step when walking before calling super. Also, when * specified it picks up an item at the end of a path. @@ -286,7 +288,6 @@ class LocalPlayer : public Player */ Being* getTarget() const; - /** * Sets the target being of the player. */ |