diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-23 00:15:59 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-11-23 00:15:59 +0100 |
commit | 6a051b7cd88d3c547e1c257972d7299b0df9c32a (patch) | |
tree | 33c46d027f70a3cf69f99570e080e5aa8fc64945 /source/Piston.cpp | |
parent | Fixed some piston bugs (diff) | |
download | cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.gz cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.bz2 cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.lz cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.xz cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.tar.zst cuberite-6a051b7cd88d3c547e1c257972d7299b0df9c32a.zip |
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r-- | source/Piston.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp index 25702e2b6..63ffbad0b 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 = 5; +const int PISTON_TICK_DELAY = 6; @@ -140,9 +140,11 @@ void cPiston::RetractPiston(int pistx, int pisty, int pistz) return; } + AddDir(pistx, pisty, pistz, pistonMeta, -1); 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)); + AddDir(pistx, pisty, pistz, pistonMeta, 1); // Retract the extension, pull block if appropriate if (IsSticky(pistonBlock)) |