diff options
-rw-r--r-- | src/gui/viewport.cpp | 6 | ||||
-rw-r--r-- | src/localplayer.cpp | 6 |
2 files changed, 7 insertions, 5 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; diff --git a/src/localplayer.cpp b/src/localplayer.cpp index a16aa685..34a99bc9 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -273,7 +273,11 @@ void LocalPlayer::setTarget(Being *target) if (mLastAction != -1) return; mLastAction = tick_time; - mTargetTime = tick_time; + + if (target) + { + mTargetTime = tick_time; + } if (target == mTarget) { |