diff options
author | keyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-18 03:51:55 +0100 |
---|---|---|
committer | keyboard.osh@gmail.com <keyboard.osh@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-18 03:51:55 +0100 |
commit | 8557ed83593444b3bfbf9dabb1a6ebbaa10299d3 (patch) | |
tree | c560c8243d5c93251ac308253e9d5870ee0f70e1 /source/ChunkMap.cpp | |
parent | Rewritten generators so that they use the cChunkDesc class (and thus can use cBlockArea merging) (diff) | |
download | cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar.gz cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar.bz2 cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar.lz cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar.xz cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.tar.zst cuberite-8557ed83593444b3bfbf9dabb1a6ebbaa10299d3.zip |
Diffstat (limited to '')
-rw-r--r-- | source/ChunkMap.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp index aad956aff..c7a341af2 100644 --- a/source/ChunkMap.cpp +++ b/source/ChunkMap.cpp @@ -322,6 +322,22 @@ void cChunkMap::BroadcastEntityEquipment(const cEntity & a_Entity, short a_SlotN +void cChunkMap::BroadcastEntVelocity(const cEntity & a_Entity, 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->BroadcastEntVelocity(a_Entity, a_Exclude); +} + + + + + void cChunkMap::BroadcastEntRelMoveLook(const cEntity & a_Entity, char a_RelX, char a_RelY, char a_RelZ, const cClientHandle * a_Exclude) { cCSLock Lock(m_CSLayers); |