summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 9e9b0da9..bde34a7c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -623,7 +623,12 @@ void do_input()
if (keys[SDLK_LCTRL])
{
Being *monster = attack(x, y, player_node->direction);
- if (keys[SDLK_LSHIFT]) {
+ if (monster == NULL && autoTarget != NULL)
+ {
+ attack(autoTarget);
+ }
+ else if (keys[SDLK_LSHIFT])
+ {
autoTarget = monster;
}
}