summaryrefslogtreecommitdiffstats
path: root/source/ChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-21 09:46:28 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-21 09:46:28 +0200
commit3f9e876d70851ed0333a3fdc57d883f040e92d8b (patch)
tree789155746561aed3b04818ed4221f40fa42e77fd /source/ChunkMap.cpp
parentDouble chests are now working, and with sound. (FS #69) (diff)
downloadcuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.gz
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.bz2
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.lz
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.xz
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.tar.zst
cuberite-3f9e876d70851ed0333a3fdc57d883f040e92d8b.zip
Diffstat (limited to 'source/ChunkMap.cpp')
-rw-r--r--source/ChunkMap.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp
index a5d8b004e..06b1d9039 100644
--- a/source/ChunkMap.cpp
+++ b/source/ChunkMap.cpp
@@ -466,6 +466,25 @@ void cChunkMap::BroadcastSoundEffect(const AString & a_SoundName, int a_SrcX, in
+void cChunkMap::BroadcastSoundParticleEffect(int a_EffectID, int a_SrcX, int a_SrcY, int a_SrcZ, int a_Data, const cClientHandle * a_Exclude)
+{
+ cCSLock Lock(m_CSLayers);
+ int ChunkX, ChunkZ;
+
+ cChunkDef::BlockToChunk(a_SrcX / 8, a_SrcY / 8, a_SrcZ / 8, ChunkX, ChunkZ);
+ cChunkPtr Chunk = GetChunkNoGen(ChunkX, 0, ChunkZ);
+ if (Chunk == NULL)
+ {
+ return;
+ }
+ // It's perfectly legal to broadcast packets even to invalid chunks!
+ Chunk->BroadcastSoundParticleEffect(a_EffectID, a_SrcX, a_SrcY, a_SrcZ, a_Data, a_Exclude);
+}
+
+
+
+
+
void cChunkMap::BroadcastBlockBreakAnimation(int a_entityID, int a_blockX, int a_blockY, int a_blockZ, char a_stage, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSLayers);