diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-27 06:02:05 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-27 06:02:05 +0000 |
commit | dc4cfce2e367b93b9733869298a3459883df2e3d (patch) | |
tree | 58ccf0ecdf7c6a0ad036c2179e2fc106006a671a /src/gui/viewport.cpp | |
parent | d303b0164b62708b48b9f831ff0e37bddd8eb5e9 (diff) | |
download | mana-client-dc4cfce2e367b93b9733869298a3459883df2e3d.tar.gz mana-client-dc4cfce2e367b93b9733869298a3459883df2e3d.tar.bz2 mana-client-dc4cfce2e367b93b9733869298a3459883df2e3d.tar.xz mana-client-dc4cfce2e367b93b9733869298a3459883df2e3d.zip |
Fixed mouse attacks and targeting.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 426906a0..b6c25dfb 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -300,16 +300,14 @@ void Viewport::mousePressed(gcn::MouseEvent &event) if (being->mAction == Being::DEAD) break; - if (keyboard.isKeyActive(keyboard.KEY_TARGET) || player_node->withinAttackRange(being)) + if (player_node->withinAttackRange(being)) { - player_node->stopAttack(); player_node->setGotoTarget(being); - player_node->attack(being, true); + player_node->attack(being, keyboard.isKeyActive(keyboard.KEY_TARGET)); } else { player_node->setDestination(tilex, tiley); - player_node->stopAttack(); } break; |