summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp10
-rw-r--r--src/actions/move.cpp8
2 files changed, 16 insertions, 2 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 1c57bd677..529025481 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -459,8 +459,11 @@ impHandler(follow)
impHandler(navigate)
{
- if (!localPlayer)
+ if (!localPlayer ||
+ !localPlayer->canMove())
+ {
return false;
+ }
int x = 0;
int y = 0;
@@ -474,8 +477,11 @@ impHandler(navigate)
impHandler(navigateTo)
{
- if (!localPlayer)
+ if (!localPlayer ||
+ !localPlayer->canMove())
+ {
return false;
+ }
const std::string args = event.args;
if (args.empty())
diff --git a/src/actions/move.cpp b/src/actions/move.cpp
index 2c9a3b692..789556910 100644
--- a/src/actions/move.cpp
+++ b/src/actions/move.cpp
@@ -71,6 +71,8 @@ impHandler(moveUp)
return petDirectUp(event);
else if (inputManager.isActionActive(InputAction::STOP_ATTACK))
return petMoveUp(event);
+ else if (!localPlayer->canMove())
+ return directUp(event);
if (popupMenu->isPopupVisible())
{
popupMenu->moveUp();
@@ -87,6 +89,8 @@ impHandler(moveDown)
return petDirectDown(event);
else if (inputManager.isActionActive(InputAction::STOP_ATTACK))
return petMoveDown(event);
+ else if (!localPlayer->canMove())
+ return directDown(event);
if (popupMenu->isPopupVisible())
{
popupMenu->moveDown();
@@ -110,6 +114,8 @@ impHandler(moveLeft)
return petDirectLeft(event);
else if (inputManager.isActionActive(InputAction::STOP_ATTACK))
return petMoveLeft(event);
+ else if (!localPlayer->canMove())
+ return directLeft(event);
return closeMoveNpcDialog(false);
}
@@ -128,6 +134,8 @@ impHandler(moveRight)
return petDirectRight(event);
else if (inputManager.isActionActive(InputAction::STOP_ATTACK))
return petMoveRight(event);
+ else if (!localPlayer->canMove())
+ return directRight(event);
return closeMoveNpcDialog(false);
}