From 8142574f65398383f6511675d60c82e3f65535c8 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 13 Jan 2012 02:15:54 +0100 Subject: Don't lose the active target when pushing the target&attack key while moving. 1st part of Mana-Mantis #441. Reviewed-by: Bjorn --- src/game.cpp | 4 ++-- 1 file 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, -- cgit v1.2.3-70-g09d2