diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 17:29:49 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-19 17:29:49 +0200 |
commit | 00f8c3a2251833f2d16ec89861a4377029cb2401 (patch) | |
tree | 595e6a1a43c31efdd5f47daff11f9a34c4d3a8e0 /src/ChunkSender.cpp | |
parent | Reduce duplication in CompressPacket (diff) | |
download | cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar.gz cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar.bz2 cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar.lz cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar.xz cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.tar.zst cuberite-00f8c3a2251833f2d16ec89861a4377029cb2401.zip |
Diffstat (limited to 'src/ChunkSender.cpp')
-rw-r--r-- | src/ChunkSender.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ChunkSender.cpp b/src/ChunkSender.cpp index 3c4c565a3..dc0af8647 100644 --- a/src/ChunkSender.cpp +++ b/src/ChunkSender.cpp @@ -245,13 +245,15 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, std::unordered_set<cCli { return; } - cChunkDataSerializer Data(m_Data, m_BiomeMap, m_World.GetDimension()); - for (const auto Client : a_Clients) { // Send: - Client->SendChunkData(a_ChunkX, a_ChunkZ, Data); + cChunkDataSerializer Data(a_ChunkX, a_ChunkZ, m_Data, m_BiomeMap, m_World.GetDimension()); + Data.SendToClients(a_Clients); + } + for (const auto Client : a_Clients) + { // Send block-entity packets: for (const auto & Pos : m_BlockEntities) { |