diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-13 02:15:54 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-14 22:48:06 +0100 |
commit | 8142574f65398383f6511675d60c82e3f65535c8 (patch) | |
tree | 65b08e9829b703fedd38d826135b05e69e1dbe6b | |
parent | ee0db8e55a060f9b0ebe91fd4d32653988c5dce4 (diff) | |
download | mana-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
-rw-r--r-- | src/game.cpp | 4 |
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, |