summaryrefslogtreecommitdiff
path: root/src/actions/move.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/move.cpp')
-rw-r--r--src/actions/move.cpp8
1 files changed, 8 insertions, 0 deletions
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);
}