summaryrefslogtreecommitdiffstats
path: root/src/ChunkSender.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-03-05 14:03:55 +0100
committerGitHub <noreply@github.com>2021-03-05 14:03:55 +0100
commit868cd94ee9a5a0638c014a4cc42224f01ff234c8 (patch)
treecd23dc866f77de5b0b3e89a5eafeeb2ef24ffbdd /src/ChunkSender.cpp
parentfixed the crash on generating in the SinglePiceStructuresGen (#5136) (diff)
downloadcuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar.gz
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar.bz2
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar.lz
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar.xz
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.tar.zst
cuberite-868cd94ee9a5a0638c014a4cc42224f01ff234c8.zip
Diffstat (limited to 'src/ChunkSender.cpp')
-rw-r--r--src/ChunkSender.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ChunkSender.cpp b/src/ChunkSender.cpp
index 0a7f58bc7..e40714472 100644
--- a/src/ChunkSender.cpp
+++ b/src/ChunkSender.cpp
@@ -238,7 +238,7 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, const WeakClients & a_C
}
// Send:
- m_Serializer.SendToClients(a_ChunkX, a_ChunkZ, m_Data, m_BiomeMap, Clients);
+ m_Serializer.SendToClients(a_ChunkX, a_ChunkZ, m_BlockData, m_LightData, m_BiomeMap, Clients);
for (const auto & Client : Clients)
{
@@ -276,7 +276,7 @@ void cChunkSender::SendChunk(int a_ChunkX, int a_ChunkZ, const WeakClients & a_C
});
}
}
- m_Data.Clear();
+
m_BlockEntities.clear();
m_EntityIDs.clear();
}
@@ -303,14 +303,14 @@ void cChunkSender::Entity(cEntity * a_Entity)
-void cChunkSender::BiomeData(const cChunkDef::BiomeMap * a_BiomeMap)
+void cChunkSender::BiomeMap(const cChunkDef::BiomeMap & a_BiomeMap)
{
for (size_t i = 0; i < ARRAYCOUNT(m_BiomeMap); i++)
{
- if ((*a_BiomeMap)[i] < 255)
+ if (a_BiomeMap[i] < 255)
{
// Normal MC biome, copy as-is:
- m_BiomeMap[i] = static_cast<unsigned char>((*a_BiomeMap)[i]);
+ m_BiomeMap[i] = static_cast<unsigned char>(a_BiomeMap[i]);
}
else
{
@@ -319,7 +319,3 @@ void cChunkSender::BiomeData(const cChunkDef::BiomeMap * a_BiomeMap)
}
} // for i - m_BiomeMap[]
}
-
-
-
-