summaryrefslogtreecommitdiff
path: root/src/progs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-17 19:51:59 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-17 19:51:59 +0300
commit58c319a56a70588b59868099c659f70209a60be1 (patch)
tree8f964df390f54834bf3a6b4b9d2eeeec66d1b3f8 /src/progs
parent2bd61993e4b8cb190fbbbcf620f4901636404d48 (diff)
downloadManaVerse-58c319a56a70588b59868099c659f70209a60be1.tar.gz
ManaVerse-58c319a56a70588b59868099c659f70209a60be1.tar.bz2
ManaVerse-58c319a56a70588b59868099c659f70209a60be1.tar.xz
ManaVerse-58c319a56a70588b59868099c659f70209a60be1.zip
Remove default parameters from localplayer.
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/manaplus/actions/actions.cpp12
-rw-r--r--src/progs/manaplus/actions/commands.cpp2
-rw-r--r--src/progs/manaplus/actions/move.cpp2
-rw-r--r--src/progs/manaplus/gui/viewport.cpp8
4 files changed, 13 insertions, 11 deletions
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)