Bed piston fix (#3956)
* Threaded world interface into ConvertBlockToPickups * Changed how cBlockPiston::PushBlocks sets the old block to air, so that the block exists for the DropBlock call. * Removed unused a_Digger argument. * Removed incorrect comment * This time actually removed a_Digger references.
This commit is contained in:
committed by
Alexander Harkness
parent
b55e5f5ad1
commit
87c89a1727
@@ -115,9 +115,7 @@ void cBlockPistonHandler::PushBlocks(
|
||||
for (auto & moveBlockPos : sortedBlocks)
|
||||
{
|
||||
a_World.GetBlockTypeMeta(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, moveBlock, moveMeta);
|
||||
a_World.SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, E_BLOCK_AIR, 0);
|
||||
|
||||
moveBlockPos += a_PushDir;
|
||||
if (cBlockInfo::IsPistonBreakable(moveBlock))
|
||||
{
|
||||
// Block is breakable, drop it
|
||||
@@ -130,10 +128,13 @@ void cBlockPistonHandler::PushBlocks(
|
||||
moveBlockPos.x, moveBlockPos.y, moveBlockPos.z
|
||||
);
|
||||
}
|
||||
a_World.SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, E_BLOCK_AIR, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not breakable, just move it
|
||||
a_World.SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, E_BLOCK_AIR, 0);
|
||||
moveBlockPos += a_PushDir;
|
||||
a_World.SetBlock(moveBlockPos.x, moveBlockPos.y, moveBlockPos.z, moveBlock, moveMeta);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user