summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-29 17:03:41 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-05-29 17:03:41 +0200
commitaa4477822ab0f1cdba904fd39e065bf8e86f9aec (patch)
treeeda0760efe66a8bc27fd00c38e84276c7df02654
parentMore comments! (diff)
downloadcuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar.gz
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar.bz2
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar.lz
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar.xz
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.tar.zst
cuberite-aa4477822ab0f1cdba904fd39e065bf8e86f9aec.zip
-rw-r--r--src/Blocks/BlockPiston.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h
index d7c92925b..e6fa48e54 100644
--- a/src/Blocks/BlockPiston.h
+++ b/src/Blocks/BlockPiston.h
@@ -143,7 +143,12 @@ private:
}
}
- return CanBreakPush(a_BlockType) ? false /* CanBreakPush returns true, but we need false to prevent pulling */ : CanPush(a_BlockType, a_BlockMeta);
+ if (CanBreakPush(a_BlockType))
+ {
+ return false; // CanBreakPush returns true, but we need false to prevent pulling
+ }
+
+ return CanPush(a_BlockType, a_BlockMeta);
}
/// Returns how many blocks the piston has to push (where the first free space is); < 0 when unpushable