From ba048e2101d42af53f2ac7a9a3ed04c194918136 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 3 Apr 2020 20:24:49 +0000 Subject: 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 --- src/ChunkMap.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/ChunkMap.cpp') diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index cb6ba07ca..fd4987bb4 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -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); -- cgit v1.2.3