summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp15
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;
}
}
}