New hotfix to prevent calling OnBroken (#4600)
* Fix stack overflow in breaking ice. Stupid fix, but it does work and is used in other places too... * Replace hotfix for pistons with better one * Fix comments in BlockBed handler
This commit is contained in:
committed by
GitHub
parent
4c6f95f49a
commit
ba048e2101
@@ -641,12 +641,7 @@ void cChunkMap::SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE
|
||||
GetBlockTypeMeta(a_BlockPos, blockType, blockMeta);
|
||||
cChunkInterface ChunkInterface(this);
|
||||
|
||||
// Hotfix for https://github.com/cuberite/cuberite/issues/4468
|
||||
// Should be removed when a proper fix is found.
|
||||
if ((blockType != E_BLOCK_PISTON) && (blockType != E_BLOCK_STICKY_PISTON) && (blockType != E_BLOCK_PISTON_EXTENSION))
|
||||
{
|
||||
BlockHandler(blockType)->OnBroken(ChunkInterface, *m_World, a_BlockPos, blockType, blockMeta);
|
||||
}
|
||||
BlockHandler(blockType)->OnBroken(ChunkInterface, *m_World, a_BlockPos, blockType, blockMeta);
|
||||
|
||||
chunk->SetBlock(relPos, a_BlockType, a_BlockMeta);
|
||||
m_World->GetSimulatorManager()->WakeUp(a_BlockPos, chunk);
|
||||
|
||||
Reference in New Issue
Block a user