diff options
-rw-r--r-- | src/gui/viewport.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index ce506ba1..0b7cc0f8 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -471,10 +471,8 @@ void Viewport::mouseDragged(gcn::MouseEvent &event) if (mLocalWalkTime != player_node->getWalkTime()) { mLocalWalkTime = player_node->getWalkTime(); - int destX = (event.getX() + mPixelViewX + 16) / - mMap->getTileWidth(); - int destY = (event.getY() + mPixelViewY + 16) / - mMap->getTileHeight(); + int destX = (event.getX() + mPixelViewX) / mMap->getTileWidth(); + int destY = (event.getY() + mPixelViewY) / mMap->getTileHeight(); player_node->setDestination(destX, destY); } } |