summaryrefslogtreecommitdiff
path: root/src/keyboarddata.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-11 01:47:14 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-11 01:51:41 +0300
commita54f29e3313c2eb60369055731b0f50bd2ff20a3 (patch)
tree4d0c59fb180063f9e0933a2c6ee61bc387609d87 /src/keyboarddata.h
parent9be7d0ac1127477a5ff5ffb3fb3dd45487eec213 (diff)
downloadmanaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.gz
manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.bz2
manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.tar.xz
manaverse-a54f29e3313c2eb60369055731b0f50bd2ff20a3.zip
Convert attack handling code to new format.
Diffstat (limited to 'src/keyboarddata.h')
-rw-r--r--src/keyboarddata.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/keyboarddata.h b/src/keyboarddata.h
index d1b77f3ea..46a442d1d 100644
--- a/src/keyboarddata.h
+++ b/src/keyboarddata.h
@@ -67,16 +67,16 @@ static KeyData const keyData[Input::KEY_TOTAL] = {
INPUT_KEYBOARD, SDLK_LCTRL,
INPUT_UNKNOWN, Input::KEY_NO_VALUE,
Input::GRP_DEFAULT,
- nullptr,
+ &ActionManager::attack,
Input::KEY_NO_VALUE, 50,
- COND_DEFAULT},
+ COND_GAME | COND_NOFOLLOW | COND_VALIDSPEED},
{"keyTargetAttack",
INPUT_KEYBOARD, SDLK_x,
- INPUT_UNKNOWN, Input::KEY_NO_VALUE,
+ INPUT_JOYSTICK, 0,
Input::GRP_DEFAULT,
- nullptr,
+ &ActionManager::targetAttack,
Input::KEY_NO_VALUE, 50,
- COND_DEFAULT},
+ COND_GAME | COND_NOFOLLOW | COND_VALIDSPEED},
{"keyMoveToTarget",
INPUT_KEYBOARD, SDLK_v,
INPUT_UNKNOWN, Input::KEY_NO_VALUE,
@@ -133,27 +133,27 @@ static KeyData const keyData[Input::KEY_TOTAL] = {
&ActionManager::untarget,
Input::KEY_NO_VALUE, 50,
COND_GAME},
- {"keyTargetClosest",
+ {"keyTargetMonster",
INPUT_KEYBOARD, SDLK_a,
- INPUT_UNKNOWN, Input::KEY_NO_VALUE,
+ INPUT_JOYSTICK, 0,
Input::GRP_DEFAULT,
- nullptr,
+ &ActionManager::targetMonster,
Input::KEY_NO_VALUE, 50,
- COND_DEFAULT},
+ COND_GAME | COND_NOTARGET},
{"keyTargetNPC",
INPUT_KEYBOARD, SDLK_n,
INPUT_UNKNOWN, Input::KEY_NO_VALUE,
Input::GRP_DEFAULT,
- nullptr,
+ &ActionManager::targetNPC,
Input::KEY_NO_VALUE, 50,
- COND_DEFAULT},
+ COND_GAME | COND_NOTARGET},
{"keyTargetPlayer",
INPUT_KEYBOARD, SDLK_q,
INPUT_UNKNOWN, Input::KEY_NO_VALUE,
Input::GRP_DEFAULT,
- nullptr,
+ &ActionManager::targetPlayer,
Input::KEY_NO_VALUE, 50,
- COND_DEFAULT},
+ COND_GAME | COND_NOTARGET},
{"keyPickup",
INPUT_KEYBOARD, SDLK_z,
INPUT_JOYSTICK, 1,