diff options
author | madmaxoft <github@xoft.cz> | 2013-09-15 20:34:22 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-09-15 20:34:22 +0200 |
commit | 4e200df18ce04f6bd0c495ea24a7c21c2f799ded (patch) | |
tree | 75dad24f4f8deddb5d7d41b408126409be164a0d /source/Piston.cpp | |
parent | APIDump: Added a first part of cWorld documentation. (diff) | |
parent | Possible Linux compile fix (diff) | |
download | cuberite-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.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); } |