1
0

Fully implemented leashes (#3798)

This commit is contained in:
Pablo Beltrán
2017-08-21 10:46:41 +02:00
committed by Mattes D
parent f81e6f6b6d
commit b18f6637b6
42 changed files with 1022 additions and 21 deletions

View File

@@ -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)
{