diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-05-22 13:17:30 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-05-22 13:17:30 +0000 |
commit | 347246d6719e12e426f5681085493dc0227345ed (patch) | |
tree | 0361e73edb89580d1fcba2a3a2ac88fa96d579e4 /src/game.cpp | |
parent | 0c6830040481247a96ccc8fe15f9b1022506c0ae (diff) | |
download | mana-347246d6719e12e426f5681085493dc0227345ed.tar.gz mana-347246d6719e12e426f5681085493dc0227345ed.tar.bz2 mana-347246d6719e12e426f5681085493dc0227345ed.tar.xz mana-347246d6719e12e426f5681085493dc0227345ed.zip |
This way auto attack should work with left ctrl too (also
some docs updates)
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
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; } } } |