From 3381c0f6d6671a485283c889b036c0a431e2a2b9 Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Thu, 8 Oct 2020 21:13:44 +0200 Subject: Merged OnBreak with OnPlayerBreak (#4967) Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang --- src/Blocks/BlockPiston.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/Blocks/BlockPiston.cpp') diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp index 7e6ff5e3f..20863cdf3 100644 --- a/src/Blocks/BlockPiston.cpp +++ b/src/Blocks/BlockPiston.cpp @@ -289,9 +289,11 @@ bool cBlockPistonHandler::CanPushBlock( void cBlockPistonHandler::OnBroken( cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, - BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta + BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta, + const cEntity * a_Digger ) const { + UNUSED(a_Digger); if (!IsExtended(a_OldBlockMeta)) { return; @@ -301,7 +303,7 @@ void cBlockPistonHandler::OnBroken( if ( cChunkDef::IsValidHeight(Extension.y) && (a_ChunkInterface.GetBlock(Extension) == E_BLOCK_PISTON_EXTENSION) - ) + ) { // If the piston is extended, destroy the extension as well: a_ChunkInterface.SetBlock(Extension, E_BLOCK_AIR, 0); @@ -318,9 +320,11 @@ void cBlockPistonHandler::OnBroken( void cBlockPistonHeadHandler::OnBroken( cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, Vector3i a_BlockPos, - BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta + BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta, + const cEntity * a_Digger ) const { + UNUSED(a_Digger); const auto Base = a_BlockPos - cBlockPistonHandler::MetadataToOffset(a_OldBlockMeta); if (!cChunkDef::IsValidHeight(Base.y)) { -- cgit v1.2.3