1
0

Renamed animation function

Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just
players can have animations, you know.
This commit is contained in:
Tiger Wang
2013-12-06 23:47:07 +00:00
parent a5dd0e2b88
commit 30ead79049
23 changed files with 82 additions and 47 deletions

View File

@@ -573,16 +573,16 @@ void cChunkMap::BroadcastEntityVelocity(const cEntity & a_Entity, const cClientH
void cChunkMap::BroadcastPlayerAnimation(const cPlayer & a_Player, char a_Animation, const cClientHandle * a_Exclude)
void cChunkMap::BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoGen(a_Player.GetChunkX(), ZERO_CHUNK_Y, a_Player.GetChunkZ());
cChunkPtr Chunk = GetChunkNoGen(a_Entity.GetChunkX(), ZERO_CHUNK_Y, a_Entity.GetChunkZ());
if (Chunk == NULL)
{
return;
}
// It's perfectly legal to broadcast packets even to invalid chunks!
Chunk->BroadcastPlayerAnimation(a_Player, a_Animation, a_Exclude);
Chunk->BroadcastEntityAnimation(a_Entity, a_Animation, a_Exclude);
}