summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-27 06:05:18 +0000
committerIra Rice <irarice@gmail.com>2008-10-27 06:05:18 +0000
commit8057f36623788c1d675e0311d98362b7d1d9f892 (patch)
treec928aae18bb00c9caaa20b94556e0331cb361383
parentdc4cfce2e367b93b9733869298a3459883df2e3d (diff)
downloadmana-client-8057f36623788c1d675e0311d98362b7d1d9f892.tar.gz
mana-client-8057f36623788c1d675e0311d98362b7d1d9f892.tar.bz2
mana-client-8057f36623788c1d675e0311d98362b7d1d9f892.tar.xz
mana-client-8057f36623788c1d675e0311d98362b7d1d9f892.zip
Changed mouse attack behavior so that if you click on a being that's too
far away and are holding down the attack key, you will attack that being.
-rw-r--r--src/gui/viewport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index b6c25dfb..ad0c35e5 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -300,7 +300,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
if (being->mAction == Being::DEAD)
break;
- if (player_node->withinAttackRange(being))
+ if (player_node->withinAttackRange(being) || keyboard.isKeyActive(keyboard.KEY_ATTACK))
{
player_node->setGotoTarget(being);
player_node->attack(being, keyboard.isKeyActive(keyboard.KEY_TARGET));