From 91a13c8e8793109e072a03dc67554ea109ac08e9 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 15 Sep 2013 16:40:09 +0100 Subject: [PATCH] Fixed pistons pulling un-pullables --- source/Piston.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); }