summaryrefslogtreecommitdiffstats
path: root/source/Piston.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-09-15 20:34:22 +0200
committermadmaxoft <github@xoft.cz>2013-09-15 20:34:22 +0200
commit4e200df18ce04f6bd0c495ea24a7c21c2f799ded (patch)
tree75dad24f4f8deddb5d7d41b408126409be164a0d /source/Piston.cpp
parentAPIDump: Added a first part of cWorld documentation. (diff)
parentPossible Linux compile fix (diff)
downloadcuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar.gz
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar.bz2
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar.lz
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar.xz
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.tar.zst
cuberite-4e200df18ce04f6bd0c495ea24a7c21c2f799ded.zip
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r--source/Piston.cpp8
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);
}