summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/localplayer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index b4418bbc..50a9462f 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -707,8 +707,8 @@ void LocalPlayer::setInvItem(int index, int id, int amount)
void LocalPlayer::pickUp(FloorItem *item)
{
- int dx = item->getX() - (int) getPosition().x / 32;
- int dy = item->getY() - (int) getPosition().y / 32;
+ int dx = item->getX() - (int) getPosition().x / mMap->getTileWidth();
+ int dy = item->getY() - ((int) getPosition().y - 1) / mMap->getTileHeight();
if (dx * dx + dy * dy < 4)
{