1
0

Added missing checks for Initialize function and updated APIDoc

This commit is contained in:
Lukas Pioch
2017-05-02 13:16:59 +02:00
parent 41bfb22834
commit 5580d558a5
7 changed files with 76 additions and 18 deletions

View File

@@ -62,7 +62,12 @@ void cSandSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
);
*/
cFallingBlock * FallingBlock = new cFallingBlock(Pos, BlockType, a_Chunk->GetMeta(itr->x, itr->y, itr->z));
FallingBlock->Initialize(m_World);
if (!FallingBlock->Initialize(m_World))
{
delete FallingBlock;
FallingBlock = nullptr;
continue;
}
a_Chunk->SetBlock(itr->x, itr->y, itr->z, E_BLOCK_AIR, 0);
}
}