summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
commitbcdf34645ff3067d3b4110120b6191af2b0b2e99 (patch)
tree428493a138f0fdaebd4c915153f0dcdcbaedf76d /src/gui/viewport.cpp
parenta93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (diff)
parentb64a1f46b930516927b1290c1d6771b491b84958 (diff)
downloadmv-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.gz
mv-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.bz2
mv-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.xz
mv-bcdf34645ff3067d3b4110120b6191af2b0b2e99.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index df97a5673..46d47ab4a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -276,6 +276,7 @@ void Viewport::logic()
void Viewport::followMouse()
{
+ return;
if (!gui)
return;
const uint8_t button = Gui::getMouseState(&mMouseX, &mMouseY);
@@ -667,7 +668,10 @@ void Viewport::walkByMouse(const MouseEvent &event)
void Viewport::mouseDragged(MouseEvent &event)
{
if (event.getSource() != this || event.isConsumed())
+ {
+ mPlayerFollowMouse = false;
return;
+ }
if (mMouseClicked)
{
if (abs(event.getX() - mMousePressX) > 32
@@ -879,13 +883,16 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
if (!mMap || !player_node || !actorManager)
return;
+ if (mMouseDirectionMove)
+ mPlayerFollowMouse = false;
+
const int x = mMouseX + mPixelViewX;
const int y = mMouseY + mPixelViewY;
ActorSprite::Type type = ActorSprite::UNKNOWN;
+ mHoverBeing = actorManager->findBeingByPixel(x, y, true);
if (mHoverBeing)
type = mHoverBeing->getType();
- mHoverBeing = actorManager->findBeingByPixel(x, y, true);
if (mHoverBeing
&& (type == Being::PLAYER
|| type == Being::NPC