diff options
Diffstat (limited to 'source/Protocol')
-rw-r--r-- | source/Protocol/Protocol125.cpp | 2 | ||||
-rw-r--r-- | source/Protocol/Protocol132.cpp | 13 | ||||
-rw-r--r-- | source/Protocol/Protocol16x.cpp | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 4577e0c16..54bd28c9f 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -584,7 +584,7 @@ void cProtocol125::SendPlayerListItem(const cPlayer & a_Player, bool a_IsOnline) WriteByte ((unsigned char)PACKET_PLAYER_LIST_ITEM); WriteString(PlayerName); WriteBool (a_IsOnline); - WriteShort (a_Player.GetClientHandle()->GetPing()); + WriteShort (a_IsOnline ? a_Player.GetClientHandle()->GetPing() : 0); Flush(); } diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index 26a1a9fad..a06eb0b8b 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -452,8 +452,17 @@ void cProtocol132::SendTabCompletionResults(const AStringVector & a_Results) void cProtocol132::SendUnloadChunk(int a_ChunkX, int a_ChunkZ) { - // Not used in 1.3.2 - // Does it unload chunks on its own? + // Unloading the chunk is done by sending a "map chunk" packet + // with IncludeInitialize set to true and primary bitmap set to 0: + cCSLock Lock(m_CSPacket); + WriteByte(PACKET_CHUNK_DATA); + WriteInt (a_ChunkX); + WriteInt (a_ChunkZ); + WriteBool(true); // IncludeInitialize + WriteShort(0); // Primary bitmap + WriteShort(0); // Add bitmap + WriteInt(0); + Flush(); } diff --git a/source/Protocol/Protocol16x.cpp b/source/Protocol/Protocol16x.cpp index 3a640da21..be5b45f19 100644 --- a/source/Protocol/Protocol16x.cpp +++ b/source/Protocol/Protocol16x.cpp @@ -213,6 +213,10 @@ int cProtocol161::ParseSteerVehicle(void) { m_Client->HandleUnmount(); } + else + { + m_Client->HandleSteerVehicle(Forward, Sideways); + } return PARSE_OK; } |