diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-20 20:15:34 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-20 20:17:07 +0200 |
commit | a1dbbdf1ca8560de8cff703d21c0063610261196 (patch) | |
tree | d986d59890ed32429e6413ab8eafcd7812b1d022 /src/localplayer.cpp | |
parent | 46137db9170963393f003e6ae275f200942a83d8 (diff) | |
download | mana-a1dbbdf1ca8560de8cff703d21c0063610261196.tar.gz mana-a1dbbdf1ca8560de8cff703d21c0063610261196.tar.bz2 mana-a1dbbdf1ca8560de8cff703d21c0063610261196.tar.xz mana-a1dbbdf1ca8560de8cff703d21c0063610261196.zip |
Drop current target on death
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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; |