summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-28 02:13:12 +0000
committerIra Rice <irarice@gmail.com>2008-10-28 02:13:12 +0000
commit42a982115438f269f7b3877a759fa982ea1bffa7 (patch)
tree4eb6417d0de28ae27cff31aebd3c81dc5d01caf4
parent89d67a3c0f222529e61207891ae320a5a5babcdf (diff)
downloadmana-42a982115438f269f7b3877a759fa982ea1bffa7.tar.gz
mana-42a982115438f269f7b3877a759fa982ea1bffa7.tar.bz2
mana-42a982115438f269f7b3877a759fa982ea1bffa7.tar.xz
mana-42a982115438f269f7b3877a759fa982ea1bffa7.zip
Changed the name of the old target key to stop attack, as well as making
it do exactly that in the local player. Since it already was doing this behavior anyways, I just extended it out to stop attack at any point in the attack.
-rw-r--r--src/keyboardconfig.cpp2
-rw-r--r--src/localplayer.cpp8
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)