From 347246d6719e12e426f5681085493dc0227345ed Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 22 May 2005 13:17:30 +0000 Subject: This way auto attack should work with left ctrl too (also some docs updates) --- src/game.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 5fe8354c..ee52b0c3 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -547,17 +547,10 @@ void do_input() if (keys[SDLK_LCTRL]) { player_node->action = ATTACK; - attack(player_node->x, - player_node->y, - player_node->direction); - player_node->walk_time = tick_time; - - if (player_node->weapon == 2) { - sound.playSfx("sfx/bow_shoot_1.ogg"); - } - else { - sound.playSfx("sfx/fist-swish.ogg"); - } + int monsterId = attack(player_node->x, + player_node->y, player_node->direction); + if (keys[SDLK_LSHIFT]) + autoTarget = monsterId; } } } -- cgit v1.2.3-70-g09d2