From 51c9a63a660fe88cfa44d93028e6ae2448fb889d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Mar 2016 22:09:02 +0300 Subject: Not allow moving from sit state if server not support it. --- src/gui/viewport.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/viewport.cpp') 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) -- cgit v1.2.3-70-g09d2