summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-18 23:57:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-18 23:57:51 +0300
commitd7de4533368a36b77dbc2dbe21269690d8dc5ee5 (patch)
tree66e83823b788015013834dcc7520b0b6bdba68b5 /src/net/eathena/beingrecv.cpp
parentdc0102e6eb4ca9a202e190e6ee84b7141d4e0fe1 (diff)
downloadmanaplus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.gz
manaplus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.bz2
manaplus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.tar.xz
manaplus-d7de4533368a36b77dbc2dbe21269690d8dc5ee5.zip
Fix random one tile desync in SMSG_BEING_MOVE3 packet.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 85c276e46..5c5e18ce8 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -597,7 +597,9 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
dstBeing->setTileCoords(srcX, srcY);
if (localPlayer)
localPlayer->followMoveTo(dstBeing, srcX, srcY, dstX, dstY);
- if (!serverFeatures->haveMove3())
+ if (serverFeatures->haveMove3())
+ dstBeing->setCachedDestination(dstX, dstY);
+ else
dstBeing->setDestination(dstX, dstY);
// because server don't send direction in move packet, we fixing it
@@ -956,7 +958,9 @@ void BeingRecv::processBeingMove2(Net::MessageIn &msg)
dstBeing->setTileCoords(srcX, srcY);
if (localPlayer)
localPlayer->followMoveTo(dstBeing, srcX, srcY, dstX, dstY);
- if (!serverFeatures->haveMove3())
+ if (serverFeatures->haveMove3())
+ dstBeing->setCachedDestination(dstX, dstY);
+ else
dstBeing->setDestination(dstX, dstY);
if (dstBeing->getType() == ActorType::Player)
dstBeing->setMoveTime();