summaryrefslogtreecommitdiff
path: root/src/net/beinghandler.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 11:21:10 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-27 11:21:10 +0000
commitd3cba1c4beac4a1c98f38bbca076a98f9c90bbc4 (patch)
treee7d1ea0a7575d0dd28802e7dfe2a322e818729fc /src/net/beinghandler.cpp
parent5980dba7ace73e6587b9966bc2076ad2b2eaa5f0 (diff)
downloadmana-d3cba1c4beac4a1c98f38bbca076a98f9c90bbc4.tar.gz
mana-d3cba1c4beac4a1c98f38bbca076a98f9c90bbc4.tar.bz2
mana-d3cba1c4beac4a1c98f38bbca076a98f9c90bbc4.tar.xz
mana-d3cba1c4beac4a1c98f38bbca076a98f9c90bbc4.zip
Changed to pixel-based coordinates for beings.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r--src/net/beinghandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index 4ff92b63..ac2801c2 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -422,16 +422,16 @@ void BeingHandler::handleBeingsMoveMessage(MessageIn &msg)
int sx = msg.readShort(), sy = msg.readShort(),
dx = msg.readShort(), dy = msg.readShort();
bool update = being != player_node; // the local player already knows where he wants to go
- if (abs(being->mX - sx / 32) + abs(being->mY - sy / 32) > 4)
+ if (abs(being->mX - sx) + abs(being->mY - sy) > 4 * 32)
{
// crude handling of synchronization messages
- being->mX = sx / 32;
- being->mY = sy / 32;
+ being->mX = sx;
+ being->mY = sy;
update = true;
}
if (update)
{
- being->setDestination(dx / 32, dy / 32);
+ being->setDestination(dx, dy);
}
}
}