summaryrefslogtreecommitdiffstats
path: root/src/ChunkSender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ChunkSender.cpp')
-rw-r--r--src/ChunkSender.cpp8
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)
{