summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3cfe2e3c..203629ff 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -920,24 +920,14 @@ void Game::handleInput()
bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET);
// A set target has highest priority
- if (newTarget || !player_node->getTarget())
+ if (!player_node->getTarget())
{
Uint16 targetX = x, targetY = y;
- switch (player_node->getSpriteDirection())
- {
- case DIRECTION_UP : --targetY; break;
- case DIRECTION_DOWN : ++targetY; break;
- case DIRECTION_LEFT : --targetX; break;
- case DIRECTION_RIGHT: ++targetX; break;
- default: break;
- }
-
// Only auto target Monsters
target = beingManager->findNearestLivingBeing(targetX, targetY,
20, Being::MONSTER);
}
-
player_node->attack(target, newTarget);
}
#endif