summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 9729f55d..19ddec51 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -704,8 +704,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->getTileX() - (int) getPosition().x / 32;
+ int dy = item->getTileY() - (int) getPosition().y / 32;
if (dx * dx + dy * dy < 4)
{
@@ -716,12 +716,12 @@ void LocalPlayer::pickUp(FloorItem *item)
{
if (Net::getNetworkType() == ServerInfo::MANASERV)
{
- setDestination(item->getX() * 32 + 16, item->getY() * 32 + 16);
+ setDestination(item->getPixelX() + 16, item->getPixelY() + 16);
mPickUpTarget = item;
}
else
{
- setDestination(item->getX(), item->getY());
+ setDestination(item->getTileX(), item->getTileY());
mPickUpTarget = item;
stopAttack();
}
@@ -1480,4 +1480,4 @@ void AwayListener::action(const gcn::ActionEvent &event)
{
player_node->changeAwayMode();
}
-} \ No newline at end of file
+}