From 8057f36623788c1d675e0311d98362b7d1d9f892 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Mon, 27 Oct 2008 06:05:18 +0000 Subject: 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. --- src/gui/viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.2.3-70-g09d2