diff options
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r-- | src/gui/viewport.cpp | 7 |
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) |