diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-15 17:40:09 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-15 17:40:09 +0200 |
commit | 91a13c8e8793109e072a03dc67554ea109ac08e9 (patch) | |
tree | 86ab5ea38130c326e497c79cbe6fa06dbe5dc10e | |
parent | Mycelium now has correct placement sound (diff) | |
download | cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.gz cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.bz2 cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.lz cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.xz cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.tar.zst cuberite-91a13c8e8793109e072a03dc67554ea109ac08e9.zip |
-rw-r--r-- | source/Piston.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp index f4244d177..b5fda1600 100644 --- a/source/Piston.cpp +++ b/source/Piston.cpp @@ -270,7 +270,13 @@ bool cPiston::CanPull(BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) return false; } } - return CanPush(a_BlockType, a_BlockMeta) || CanBreakPush(a_BlockType, a_BlockMeta); + + if (CanBreakPush(a_BlockType, a_BlockMeta)) + { + return false; // CanBreakPush returns true, but we need false to prevent pulling + } + + return CanPush(a_BlockType, a_BlockMeta); } |