diff options
Diffstat (limited to '')
-rw-r--r-- | source/ChunkMap.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp index 824c7cbfe..00f40f093 100644 --- a/source/ChunkMap.cpp +++ b/source/ChunkMap.cpp @@ -274,6 +274,21 @@ cChunk * cChunkMap::FindChunk(int a_ChunkX, int a_ChunkZ) +void cChunkMap::BroadcastAttachEntity(const cEntity & a_Entity, const cEntity * a_Vehicle) +{ + 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->BroadcastAttachEntity(a_Entity, a_Vehicle); +} + + + + void cChunkMap::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude) { cCSLock Lock(m_CSLayers); |