summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-22 22:09:02 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-22 22:09:02 +0300
commit51c9a63a660fe88cfa44d93028e6ae2448fb889d (patch)
tree8c4b1db548208737a43d52fbe28b99cb5060f017 /src/gui
parentbce511aaf8b9d2b5d447f67ba0c05e2f9a92b7ca (diff)
downloadplus-51c9a63a660fe88cfa44d93028e6ae2448fb889d.tar.gz
plus-51c9a63a660fe88cfa44d93028e6ae2448fb889d.tar.bz2
plus-51c9a63a660fe88cfa44d93028e6ae2448fb889d.tar.xz
plus-51c9a63a660fe88cfa44d93028e6ae2448fb889d.zip
Not allow moving from sit state if server not support it.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/viewport.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 815aa82a8..9c4eaf713 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -500,7 +500,8 @@ bool Viewport::leftMouseAction()
return true;
}
// Just walk around
- else if (!inputManager.isActionActive(InputAction::ATTACK))
+ else if (!inputManager.isActionActive(InputAction::ATTACK) &&
+ localPlayer->canMove())
{
validateSpeed();
localPlayer->stopAttack();
@@ -756,7 +757,9 @@ void Viewport::mouseDragged(MouseEvent &event)
mPlayerFollowMouse = false;
return;
}
- if (mMouseClicked)
+ if (mMouseClicked &&
+ localPlayer &&
+ localPlayer->canMove())
{
if (abs(event.getX() - mMousePressX) > 32
|| abs(event.getY() - mMousePressY) > 32)