summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-22 23:00:37 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-11-22 23:00:37 +0100
commite40b3845474aec799ad28021763f93160f9c8c0b (patch)
tree947dcfac6b9792b1ea0636f1fcada6f237ac690f
parentFixed spawning pickups with piston arms (diff)
downloadcuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar.gz
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar.bz2
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar.lz
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar.xz
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.tar.zst
cuberite-e40b3845474aec799ad28021763f93160f9c8c0b.zip
Diffstat (limited to '')
-rw-r--r--source/Piston.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp
index 048cc355d..25702e2b6 100644
--- a/source/Piston.cpp
+++ b/source/Piston.cpp
@@ -15,7 +15,7 @@
/// Number of ticks that the piston extending / retracting waits before setting the block
-const int PISTON_TICK_DELAY = 6;
+const int PISTON_TICK_DELAY = 5;
@@ -24,7 +24,6 @@ const int PISTON_TICK_DELAY = 6;
cPiston::cPiston(cWorld * a_World)
: m_World(a_World)
{
-
}
@@ -132,19 +131,19 @@ void cPiston::RetractPiston(int pistx, int pisty, int pistz)
// Already retracted, bail out
return;
}
-
- m_World->BroadcastBlockAction(pistx, pisty, pistz, 1, pistonMeta & ~(8), pistonBlock);
- m_World->BroadcastSoundEffect("tile.piston.in", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f);
- m_World->SetBlock(pistx, pisty, pistz, pistonBlock, pistonMeta & ~(8));
// Check the extension:
AddDir(pistx, pisty, pistz, pistonMeta, 1);
if (m_World->GetBlock(pistx, pisty, pistz) != E_BLOCK_PISTON_EXTENSION)
{
- LOGD("%s: Piston without an extension?", __FUNCTION__);
+ LOGD("%s: Piston without an extension - still extending, or just in an invalid state?", __FUNCTION__);
return;
}
+ m_World->BroadcastBlockAction(pistx, pisty, pistz, 1, pistonMeta & ~(8), pistonBlock);
+ m_World->BroadcastSoundEffect("tile.piston.in", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f);
+ m_World->SetBlock(pistx, pisty, pistz, pistonBlock, pistonMeta & ~(8));
+
// Retract the extension, pull block if appropriate
if (IsSticky(pistonBlock))
{