summaryrefslogtreecommitdiffstats
path: root/source/cChunk.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 23:14:45 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-19 23:14:45 +0200
commit674fe1e955f729e8328772313c45fe76857ec835 (patch)
tree49511bc948f76825ee1ad6be310034f261b35e90 /source/cChunk.cpp
parentAlmost all packets' handling is now rewritten not to use cPacket descendants elsewhere than in cClientHandle. (diff)
downloadcuberite-674fe1e955f729e8328772313c45fe76857ec835.tar
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.gz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.bz2
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.lz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.xz
cuberite-674fe1e955f729e8328772313c45fe76857ec835.tar.zst
cuberite-674fe1e955f729e8328772313c45fe76857ec835.zip
Diffstat (limited to 'source/cChunk.cpp')
-rw-r--r--source/cChunk.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/cChunk.cpp b/source/cChunk.cpp
index 4d3c928a6..001c795eb 100644
--- a/source/cChunk.cpp
+++ b/source/cChunk.cpp
@@ -1883,6 +1883,38 @@ void cChunk::BroadcastDestroyEntity(const cEntity & a_Entity, const cClientHandl
+void cChunk::BroadcastEntityStatus(const cEntity & a_Entity, char a_Status, const cClientHandle * a_Exclude)
+{
+ for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
+ {
+ if (*itr == a_Exclude)
+ {
+ continue;
+ }
+ (*itr)->SendEntityStatus(a_Entity, a_Status);
+ } // for itr - LoadedByClient[]
+}
+
+
+
+
+
+void cChunk::BroadcastMetadata(const cPawn & a_Pawn, const cClientHandle * a_Exclude)
+{
+ for (cClientHandleList::const_iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
+ {
+ if (*itr == a_Exclude)
+ {
+ continue;
+ }
+ (*itr)->SendMetadata(a_Pawn);
+ } // for itr - LoadedByClient[]
+}
+
+
+
+
+
void cChunk::PositionToWorldPosition(int a_ChunkX, int a_ChunkY, int a_ChunkZ, int & a_X, int & a_Y, int & a_Z)
{
a_Y = a_ChunkY;