From a54f29e3313c2eb60369055731b0f50bd2ff20a3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 11 Apr 2012 01:47:14 +0300 Subject: Convert attack handling code to new format. --- src/keyboarddata.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/keyboarddata.h') 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, -- cgit v1.2.3-70-g09d2