summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 11:49:00 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-24 11:49:00 +0200
commitf0fc0edd21b9340ce48561a5fceee29e4e055dff (patch)
tree658ec25a188e8ebe16ea43f201797601d6254d35 /source/cChunkMap.cpp
parentIgnore some runtime folders (diff)
downloadcuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.gz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.bz2
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.lz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.xz
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.tar.zst
cuberite-f0fc0edd21b9340ce48561a5fceee29e4e055dff.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index b8e8b05c6..c5a770871 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -451,6 +451,22 @@ void cChunkMap::BroadcastSpawn(cEntity & a_Entity, const cClientHandle * a_Exclu
+void cChunkMap::BroadcastCollectPickup(const cPickup & a_Pickup, const cPlayer & a_Player, const cClientHandle * a_Exclude)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_Pickup.GetChunkX(), a_Pickup.GetChunkY(), a_Pickup.GetChunkZ());
+ if (Chunk == NULL)
+ {
+ return;
+ }
+ // It's perfectly legal to broadcast packets even to invalid chunks!
+ Chunk->BroadcastCollectPickup(a_Pickup, a_Player, a_Exclude);
+}
+
+
+
+
+
void cChunkMap::BroadcastBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSLayers);