From 9cbd54f5fe3b06eabdb1290ebbffe42257f460f8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Jan 2015 00:04:35 +0300 Subject: fix direction in packet SMSG_BEING_CHANGE_DIRECTION. --- src/net/eathena/beinghandler.cpp | 4 ++-- src/net/tmwa/beinghandler.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index c1ebcefca..49fc8cd77 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1242,8 +1242,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) msg.readInt16("head direction"); - const uint8_t dir = static_cast( - msg.readUInt8("player direction") & 0x0FU); + const uint8_t dir = Net::MessageIn::fromServerDirection( + static_cast(msg.readUInt8("player direction") & 0x0FU)); if (!dstBeing) { diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 05e60b43f..33c1db769 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1413,8 +1413,8 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) msg.readInt16("unused"); - const uint8_t dir = static_cast( - msg.readUInt8("direction") & 0x0FU); + const uint8_t dir = Net::MessageIn::fromServerDirection( + static_cast(msg.readUInt8("direction") & 0x0FU)); dstBeing->setDirection(dir); if (localPlayer) localPlayer->imitateDirection(dstBeing, dir); -- cgit v1.2.3-70-g09d2