From 58c319a56a70588b59868099c659f70209a60be1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 Dec 2017 19:51:59 +0300 Subject: Remove default parameters from localplayer. --- src/progs/manaplus/actions/actions.cpp | 12 ++++++------ src/progs/manaplus/actions/commands.cpp | 2 +- src/progs/manaplus/actions/move.cpp | 2 +- src/progs/manaplus/gui/viewport.cpp | 8 +++++--- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src/progs') diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp index d71ba50a5..67eefc568 100644 --- a/src/progs/manaplus/actions/actions.cpp +++ b/src/progs/manaplus/actions/actions.cpp @@ -672,7 +672,7 @@ impHandler(pickup) const std::string args = event.args; if (args.empty()) { - localPlayer->pickUpItems(); + localPlayer->pickUpItems(0); } else { @@ -837,7 +837,7 @@ impHandler0(stopAttack) { if (localPlayer != nullptr) { - localPlayer->stopAttack(); + localPlayer->stopAttack(false); // not consume if target attack key pressed if (inputManager.isActionActive(InputAction::TARGET_ATTACK)) return false; @@ -885,7 +885,7 @@ impHandler(attack) else localPlayer->setTarget(target); if (target != nullptr) - localPlayer->attack(target, true); + localPlayer->attack(target, true, false); return true; } @@ -925,7 +925,7 @@ impHandler(targetAttack) localPlayer, 90, ActorType::Monster, AllowSort_true); } - localPlayer->attack2(target, newTarget); + localPlayer->attack2(target, newTarget, false); return true; } return false; @@ -940,7 +940,7 @@ impHandler0(attackHuman) if (target != nullptr) { localPlayer->setTarget(target); - localPlayer->attack2(target, true); + localPlayer->attack2(target, true, false); } return true; } @@ -956,7 +956,7 @@ impHandler0(stopSit) { if (localPlayer != nullptr) { - localPlayer->stopAttack(); + localPlayer->stopAttack(false); // not consume if target attack key pressed if (inputManager.isActionActive(InputAction::TARGET_ATTACK)) return false; diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp index 765d1ceb1..985a17a5f 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaplus/actions/commands.cpp @@ -843,7 +843,7 @@ impHandler(testParticle) { if (localPlayer != nullptr) { - localPlayer->setTestParticle(event.args); + localPlayer->setTestParticle(event.args, true); return true; } return false; diff --git a/src/progs/manaplus/actions/move.cpp b/src/progs/manaplus/actions/move.cpp index d2be4de7e..ea4088f61 100644 --- a/src/progs/manaplus/actions/move.cpp +++ b/src/progs/manaplus/actions/move.cpp @@ -176,7 +176,7 @@ impHandler0(moveToTarget) !inputManager.isActionActive(InputAction::TARGET_ATTACK) && !inputManager.isActionActive(InputAction::ATTACK)) { - localPlayer->moveToTarget(); + localPlayer->moveToTarget(-1); return true; } return false; diff --git a/src/progs/manaplus/gui/viewport.cpp b/src/progs/manaplus/gui/viewport.cpp index de7571c7c..2ae57f170 100644 --- a/src/progs/manaplus/gui/viewport.cpp +++ b/src/progs/manaplus/gui/viewport.cpp @@ -467,7 +467,8 @@ bool Viewport::leftMouseAction() case ActorType::SkillUnit: if (!stopAttack) { - if (localPlayer->withinAttackRange(mHoverBeing) || + if (localPlayer->withinAttackRange(mHoverBeing, + false, 0) || inputManager.isActionActive(InputAction::ATTACK)) { validateSpeed(); @@ -475,7 +476,8 @@ bool Viewport::leftMouseAction() { localPlayer->attack(mHoverBeing, !inputManager.isActionActive( - InputAction::STOP_ATTACK)); + InputAction::STOP_ATTACK), + false); return true; } } @@ -531,7 +533,7 @@ bool Viewport::leftMouseAction() localPlayer->canMove()) { validateSpeed(); - localPlayer->stopAttack(); + localPlayer->stopAttack(false); localPlayer->cancelFollow(); mPlayerFollowMouse = mAllowMoveByMouse; if (mPlayerFollowMouse) -- cgit v1.2.3-70-g09d2