summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-24 20:39:20 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-24 20:39:20 -0700
commit221c682c11a203e33ab77b471213b5d05c40522d (patch)
treea237c296e4673ec00e61236a7b46c02baf89d5eb /src/game.cpp
parent4643ac4b683fff89164f7a1cfa0cd1a15797fb28 (diff)
downloadmana-client-221c682c11a203e33ab77b471213b5d05c40522d.tar.gz
mana-client-221c682c11a203e33ab77b471213b5d05c40522d.tar.bz2
mana-client-221c682c11a203e33ab77b471213b5d05c40522d.tar.xz
mana-client-221c682c11a203e33ab77b471213b5d05c40522d.zip
Prioritize monsters when targeting
Players are then the next highest priority
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 89687054..cb85fc5c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -873,11 +873,11 @@ void Game::handleInput()
!keyboard.isKeyActive(keyboard.KEY_TARGET))
{
Being::Type currentTarget = Being::UNKNOWN;
- if (keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER))
- currentTarget = Being::PLAYER;
- else if (keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
+ if (keyboard.isKeyActive(keyboard.KEY_TARGET_CLOSEST) ||
(joystick && joystick->buttonPressed(3)))
currentTarget = Being::MONSTER;
+ else if (keyboard.isKeyActive(keyboard.KEY_TARGET_PLAYER))
+ currentTarget = Being::PLAYER;
else if (keyboard.isKeyActive(keyboard.KEY_TARGET_NPC))
currentTarget = Being::NPC;