summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-13 02:15:54 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-14 22:48:06 +0100
commit8142574f65398383f6511675d60c82e3f65535c8 (patch)
tree65b08e9829b703fedd38d826135b05e69e1dbe6b /src/game.cpp
parentee0db8e55a060f9b0ebe91fd4d32653988c5dce4 (diff)
downloadmana-8142574f65398383f6511675d60c82e3f65535c8.tar.gz
mana-8142574f65398383f6511675d60c82e3f65535c8.tar.bz2
mana-8142574f65398383f6511675d60c82e3f65535c8.tar.xz
mana-8142574f65398383f6511675d60c82e3f65535c8.zip
Don't lose the active target when pushing the target&attack key while moving.
1st part of Mana-Mantis #441. Reviewed-by: Bjorn
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 7a887fb2..7501d343 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -830,11 +830,11 @@ void Game::handleInput()
if (keyboard.isKeyActive(keyboard.KEY_TARGET_ATTACK))
{
- Being *target = 0;
+ Being *target = local_player->getTarget();
bool newTarget = !keyboard.isKeyActive(keyboard.KEY_TARGET);
// A set target has highest priority
- if (!local_player->getTarget())
+ if (!target)
{
// Only auto target Monsters
target = actorSpriteManager->findNearestLivingBeing(local_player,