diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-08-25 11:56:01 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-08-25 11:56:01 +0200 |
commit | 87c89a172782c5ea8e2114931bd48f9aa03543ce (patch) | |
tree | 6ddedb3ff20e4224d0c488ddabb5a7d22e71d2f8 /src/Blocks/BlockPiston.cpp | |
parent | Use ref instead of pointer (diff) | |
download | cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar.gz cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar.bz2 cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar.lz cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar.xz cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.tar.zst cuberite-87c89a172782c5ea8e2114931bd48f9aa03543ce.zip |
Diffstat (limited to 'src/Blocks/BlockPiston.cpp')
-rw-r--r-- | src/Blocks/BlockPiston.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp index eda155265..56d335044 100644 --- a/src/Blocks/BlockPiston.cpp +++ b/src/Blocks/BlockPiston.cpp @@ -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); } } |