summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2015-06-07 21:47:47 +0200
committerAlexander Harkness <me@bearbin.net>2015-06-07 21:47:47 +0200
commit2ea316b74664539744c3f32f7062df80cbd321b3 (patch)
tree57deef6f15be95c6f1f1e27186a9f7ea8a0e2cf6 /src/ChunkMap.cpp
parentMerge pull request #2210 from nounoursheureux/bucket-craft (diff)
parentRevert "Chunk queue collapsing" (diff)
downloadcuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar.gz
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar.bz2
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar.lz
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar.xz
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.tar.zst
cuberite-2ea316b74664539744c3f32f7062df80cbd321b3.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index 4db73971c..2f38e4cd6 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -409,6 +409,22 @@ void cChunkMap::BroadcastBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ, c
+void cChunkMap::BroadcastChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer, const cClientHandle * a_Exclude)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_ChunkX, a_ChunkZ);
+ if (Chunk == nullptr)
+ {
+ return;
+ }
+ // It's perfectly legal to broadcast packets even to invalid chunks!
+ Chunk->BroadcastChunkData(a_Serializer, a_Exclude);
+}
+
+
+
+
+
void cChunkMap::BroadcastCollectEntity(const cEntity & a_Entity, const cPlayer & a_Player, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSLayers);