diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-26 17:16:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-26 17:16:06 +0300 |
commit | 57253026ddfa8acdca3a6b8d82c9e803f35655ec (patch) | |
tree | 1f62b0b5a14c921f43e40b71a07eeab15ae4bb0d /src | |
parent | a859c1fa8c67dadb908e476803b128004b08db57 (diff) | |
download | manaverse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.gz manaverse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.bz2 manaverse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.xz manaverse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.zip |
Not allow walking by mouse if npc dialog is opened.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/viewport.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 8d9e33ada..8f2940824 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -514,7 +514,6 @@ void Viewport::mousePressed(MouseEvent &event) if (event.getSource() != this || event.isConsumed()) return; - mMouseClicked = true; // Check if we are alive and kickin' if (!mMap || !localPlayer) return; @@ -522,7 +521,12 @@ void Viewport::mousePressed(MouseEvent &event) // Check if we are busy // if commented, allow context menu if npc dialog open if (PlayerInfo::isTalking()) + { + mMouseClicked = false; return; + } + + mMouseClicked = true; mMousePressX = event.getX(); mMousePressY = event.getY(); @@ -753,9 +757,9 @@ void Viewport::mouseDragged(MouseEvent &event) { mPlayerFollowMouse = true; } - } - walkByMouse(event); + walkByMouse(event); + } } void Viewport::mouseReleased(MouseEvent &event) |