Added missing checks for Initialize function and updated APIDoc
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user