1
0

Added cWorld::DoWithChunk() function.

This will be used by the blocktracers to gain direct access to chunk data.
This commit is contained in:
madmaxoft
2013-08-03 20:26:50 +02:00
parent b688ba9be8
commit 4f26f11dc7
4 changed files with 31 additions and 0 deletions

View File

@@ -713,6 +713,21 @@ void cChunkMap::UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, i
bool cChunkMap::DoWithChunk(int a_ChunkX, int a_ChunkZ, cChunkCallback & a_Callback)
{
cCSLock Lock(m_CSLayers);
cChunkPtr Chunk = GetChunkNoLoad(a_ChunkX, ZERO_CHUNK_Y, a_ChunkZ);
if (Chunk == NULL)
{
return false;
}
return a_Callback.Item(Chunk);
}
void cChunkMap::WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ)
{
cCSLock Lock(m_CSLayers);