summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ChunkDataSerializer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-01-11 17:39:43 +0100
committerGitHub <noreply@github.com>2021-01-11 17:39:43 +0100
commiteeb63b8901a9c049f1bb594abb9ce9b4a9c47620 (patch)
treeb07daae788f918b83eeb0bdbd51e49292f1c8d88 /src/Protocol/ChunkDataSerializer.cpp
parentFixed switch-ups regarding some slab and stair recipes (#5099) (diff)
downloadcuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.gz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.bz2
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.lz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.xz
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.tar.zst
cuberite-eeb63b8901a9c049f1bb594abb9ce9b4a9c47620.zip
Diffstat (limited to 'src/Protocol/ChunkDataSerializer.cpp')
-rw-r--r--src/Protocol/ChunkDataSerializer.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp
index ac740a145..a16cce02b 100644
--- a/src/Protocol/ChunkDataSerializer.cpp
+++ b/src/Protocol/ChunkDataSerializer.cpp
@@ -1,6 +1,5 @@
#include "Globals.h"
#include "ChunkDataSerializer.h"
-#include "zlib/zlib.h"
#include "Protocol_1_8.h"
#include "Protocol_1_9.h"
#include "../ClientHandle.h"
@@ -543,14 +542,10 @@ inline void cChunkDataSerializer::WriteSectionDataSeamless(const cChunkData::sCh
inline void cChunkDataSerializer::CompressPacketInto(ChunkDataCache & a_Cache)
{
- m_Packet.ReadAll(a_Cache.PacketData);
+ m_Compressor.ReadFrom(m_Packet);
m_Packet.CommitRead();
- if (!cProtocol_1_8_0::CompressPacket(a_Cache.PacketData, a_Cache.ToSend))
- {
- ASSERT(!"Packet compression failed.");
- return;
- }
+ cProtocol_1_8_0::CompressPacket(m_Compressor, a_Cache.ToSend);
a_Cache.Engaged = true;
}