summaryrefslogtreecommitdiffstats
path: root/source/cChunkMap.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 13:51:17 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 13:51:17 +0200
commiteb3ed1aec1fb9e4468a7829cabd42572b7554d70 (patch)
tree4b5f428bf612785af8c306ba40f46c66fe0681a0 /source/cChunkMap.cpp
parentFixed Bug #236 (diff)
downloadcuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.gz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.bz2
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.lz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.xz
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.tar.zst
cuberite-eb3ed1aec1fb9e4468a7829cabd42572b7554d70.zip
Diffstat (limited to '')
-rw-r--r--source/cChunkMap.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp
index a0f1e128c..5adc8f2c1 100644
--- a/source/cChunkMap.cpp
+++ b/source/cChunkMap.cpp
@@ -262,6 +262,38 @@ void cChunkMap::BroadcastToChunkOfBlock(int a_X, int a_Y, int a_Z, const cPacket
+void cChunkMap::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_Player.GetChunkX(), a_Player.GetChunkY(), a_Player.GetChunkZ());
+ if (Chunk == NULL)
+ {
+ return;
+ }
+ // It's perfectly legal to broadcast packets even to invalid chunks!
+ Chunk->BroadcastPlayerAnimation(a_Player, a_Animation, a_Exclude);
+}
+
+
+
+
+
+void cChunkMap::BroadcastEntityEquipment(const cEntity & a_Entity, short a_SlotNum, const cItem & a_Item, const cClientHandle * a_Exclude)
+{
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr Chunk = GetChunkNoGen(a_Entity.GetChunkX(), a_Entity.GetChunkY(), a_Entity.GetChunkZ());
+ if (Chunk == NULL)
+ {
+ return;
+ }
+ // It's perfectly legal to broadcast packets even to invalid chunks!
+ Chunk->BroadcastEntityEquipment(a_Entity, a_SlotNum, a_Item, a_Exclude);
+}
+
+
+
+
+
void cChunkMap::UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
{
// a_Player rclked block entity at the coords specified, handle it