From ca8cf76ea713b75db3b573f30c023f7637e9cdf3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 5 Mar 2018 21:27:37 +0300 Subject: Fix send bytes count in messageout. --- src/net/tmwa/messageout.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index 5f325b522..6379b3b1b 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -71,7 +71,6 @@ void MessageOut::writeInt16(const int16_t value, const char *const str) #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN mPos += 2; - PacketCounters::incOutBytes(2); } void MessageOut::writeInt32(const int32_t value, const char *const str) @@ -88,7 +87,6 @@ void MessageOut::writeInt32(const int32_t value, const char *const str) #endif // SDL_BYTEORDER == SDL_BIG_ENDIAN mPos += 4; - PacketCounters::incOutBytes(4); } void MessageOut::writeBeingId(const BeingId value, const char *const str) @@ -110,7 +108,7 @@ void MessageOut::writeCoordinates(const uint16_t x, CAST_U32(direction)), mPos, str); unsigned char *const data = reinterpret_cast(mData) + CAST_SIZE(mPos); - mNetwork->mOutSize += 3; + expand(3); mPos += 3; uint16_t temp = x; @@ -126,7 +124,6 @@ void MessageOut::writeCoordinates(const uint16_t x, data[2] = LOBYTE(temp); direction = toServerDirection(direction); data[2] |= direction; - PacketCounters::incOutBytes(3); } } // namespace TmwAthena -- cgit v1.2.3-70-g09d2