summaryrefslogtreecommitdiffstats
path: root/source/Piston.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r--source/Piston.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp
index f4244d177..136100922 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -21,7 +21,7 @@ extern bool g_BlockPistonBreakable[];
/// Number of ticks that the piston extending / retracting waits before setting the block
-const int PISTON_TICK_DELAY = 10;
+const int PISTON_TICK_DELAY = 20;
@@ -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);
}