diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-05 02:04:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:57 +0300 |
commit | 2a0b524403f62e0217cf52e88a0c7e4e62f88df9 (patch) | |
tree | cb0e40619e8cf7e08427ba68e5955ca5263ea184 /src/net/tmwa/playerhandler.cpp | |
parent | 2e6aa47dc0d372536985cec0e4d5ff7c9eb2bd18 (diff) | |
download | mv-2a0b524403f62e0217cf52e88a0c7e4e62f88df9.tar.gz mv-2a0b524403f62e0217cf52e88a0c7e4e62f88df9.tar.bz2 mv-2a0b524403f62e0217cf52e88a0c7e4e62f88df9.tar.xz mv-2a0b524403f62e0217cf52e88a0c7e4e62f88df9.zip |
Move processWalkResponse from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa/playerhandler.cpp')
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index a881f9dd4..3e304e8da 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -28,6 +28,7 @@ #include "being/attributes.h" #include "being/beingflag.h" +#include "being/localplayer.h" #include "gui/windows/statuswindow.h" @@ -413,4 +414,20 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) BLOCK_END("PlayerHandler::processPlayerStatUpdate5") } +void PlayerHandler::processWalkResponse(Net::MessageIn &msg) +{ + BLOCK_START("PlayerHandler::processWalkResponse") + /* + * This client assumes that all walk messages succeed, + * and that the server will send a correction notice + * otherwise. + */ + uint16_t srcX, srcY, dstX, dstY; + msg.readInt32(); // tick + msg.readCoordinatePair(srcX, srcY, dstX, dstY); + if (localPlayer) + localPlayer->setRealPos(dstX, dstY); + BLOCK_END("PlayerHandler::processWalkResponse") +} + } // namespace TmwAthena |