summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-15 00:34:34 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-15 00:56:17 +0200
commit847c623239f00a71038a1b8e3ef242c3d97f2272 (patch)
treef73583154ca410c83c1c02d2e4b11549f81914e0 /src/gui
parente8bc0d9fd1be148f111f2c560e563e0552fc9f50 (diff)
downloadmanaverse-847c623239f00a71038a1b8e3ef242c3d97f2272.tar.gz
manaverse-847c623239f00a71038a1b8e3ef242c3d97f2272.tar.bz2
manaverse-847c623239f00a71038a1b8e3ef242c3d97f2272.tar.xz
manaverse-847c623239f00a71038a1b8e3ef242c3d97f2272.zip
Fix mouse pickup. Before pickuptarget was removed while moving to target.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/viewport.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 4039dc87b..92bd0d80b 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -510,6 +510,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
if (get_elapsed_time(mLocalWalkTime) >= walkingMouseDelay)
{
mLocalWalkTime = tick_time;
+ player_node->unSetPickUpTarget();
player_node->setDestination(event.getX()
+ static_cast<int>(mPixelViewX),
event.getY()
@@ -528,6 +529,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
int destY = static_cast<int>((static_cast<float>(event.getY())
+ mPixelViewY)
/ static_cast<float>(mMap->getTileHeight()));
+ player_node->unSetPickUpTarget();
player_node->setDestination(destX, destY);
}
}