From df3e336df85ddf3142800f1ca64594a720cd4d78 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 3 Jul 2005 12:19:42 +0000 Subject: - Removing "walk to", "attack" from context menu - Attack is now default for left click (auto attack is not working yet with mouse) - Commented out "follow" from context menu --- src/game.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 27583d92..bee62b0c 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -259,12 +259,6 @@ void do_input() displayPathToMouse = !displayPathToMouse; } - // Play sound (debug purpose) - else if ((keysym.sym == SDLK_F7)) - { - sound.playSfx("sfx/fist-swish.ogg"); - } - // Input chat window else if ((keysym.sym == SDLK_RETURN) && !chatWindow->isFocused()) { @@ -436,10 +430,16 @@ void do_input() * TODO: Move player to mouse click position before * attack the monster (maybe using follow mode). */ - if ((keys[SDLK_LSHIFT]) && - (target->action != MONSTER_DEAD)) - autoTarget = target; - attack(target); + if (target->action != MONSTER_DEAD && + player_node->action==STAND) + { + if (keys[SDLK_LSHIFT]) + { + autoTarget = target; + } + attack(target); + + } } // Player default: trade else if (target->isPlayer()) @@ -622,7 +622,6 @@ void do_input() { if (keys[SDLK_LCTRL]) { - player_node->action = ATTACK; Being *monster = attack(x, y, player_node->direction); if (keys[SDLK_LSHIFT]) { autoTarget = monster; -- cgit v1.2.3-60-g2f50