summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorPablo Beltrán <spekdrum@gmail.com>2017-08-21 10:46:41 +0200
committerMattes D <github@xoft.cz>2017-08-21 10:46:41 +0200
commitb18f6637b6c58db20353cd3e77584b646ab36b5c (patch)
tree77b1dcf42aec23ef4aa64a04c906282c5f61ba19 /src/ChunkMap.cpp
parentChanged MoveToWorld to ScheduleMoveToWorld in cPlayer::Respawn (#3922) (diff)
downloadcuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.gz
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.bz2
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.lz
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.xz
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.zst
cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index fcd990ad6..6afce338d 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -275,6 +275,35 @@ void cChunkMap::BroadcastAttachEntity(const cEntity & a_Entity, const cEntity &
+void cChunkMap::BroadcastLeashEntity(const cEntity & a_Entity, const cEntity & a_EntityLeashedTo)
+{
+ cCSLock Lock(m_CSChunks);
+ cChunkPtr Chunk = GetChunkNoGen(a_Entity.GetChunkX(), a_Entity.GetChunkZ());
+ if (Chunk == nullptr)
+ {
+ return;
+ }
+ Chunk->BroadcastLeashEntity(a_Entity, a_EntityLeashedTo);
+}
+
+
+
+
+
+void cChunkMap::BroadcastUnleashEntity(const cEntity & a_Entity)
+{
+ cCSLock Lock(m_CSChunks);
+ cChunkPtr Chunk = GetChunkNoGen(a_Entity.GetChunkX(), a_Entity.GetChunkZ());
+ if (Chunk == nullptr)
+ {
+ return;
+ }
+ Chunk->BroadcastUnleashEntity(a_Entity);
+}
+
+
+
+
void cChunkMap::BroadcastBlockAction(int a_BlockX, int a_BlockY, int a_BlockZ, char a_Byte1, char a_Byte2, BLOCKTYPE a_BlockType, const cClientHandle * a_Exclude)
{