diff options
-rw-r--r-- | src/keyboardconfig.cpp | 2 | ||||
-rw-r--r-- | src/localplayer.cpp | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index 6694e5e2..46fea458 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -45,7 +45,7 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = { {"keyAttack", SDLK_LCTRL, "Attack"}, {"keySmilie", SDLK_LALT, "Smilie"}, {"keyTalk", SDLK_t, "Talk"}, - {"keyTarget", SDLK_LSHIFT, "Target"}, + {"keyTarget", SDLK_LSHIFT, "Stop Attack"}, {"keyTargetClosest", SDLK_a, "Target Closest"}, {"keyTargetNPC", SDLK_n, "Target NPC"}, {"keyTargetPlayer", SDLK_q, "Target Player"}, diff --git a/src/localplayer.cpp b/src/localplayer.cpp index a63ec18a..87a4f81b 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -29,10 +29,11 @@ #include "game.h" #include "inventory.h" #include "item.h" +#include "keyboardconfig.h" #include "main.h" +#include "monster.h" #include "particle.h" #include "sound.h" -#include "monster.h" #include "gui/gui.h" @@ -129,6 +130,11 @@ void LocalPlayer::logic() mLastTarget = -1; } + if (keyboard.isKeyActive(keyboard.KEY_TARGET)) + { + stopAttack(); + } + if (mTarget) { if (mTarget->mAction == DEAD) |