diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-20 21:17:35 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-08-20 21:17:35 +0200 |
commit | f626b8c8647b77819bf526d8ae312baded2cb017 (patch) | |
tree | 080a31a43332468f509c0799bb58bd89d563dc90 /source/Piston.cpp | |
parent | Activator rail now uses rail handler (diff) | |
download | cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar.gz cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar.bz2 cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar.lz cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar.xz cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.tar.zst cuberite-f626b8c8647b77819bf526d8ae312baded2cb017.zip |
Diffstat (limited to 'source/Piston.cpp')
-rw-r--r-- | source/Piston.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/Piston.cpp b/source/Piston.cpp index 97db3e568..f4244d177 100644 --- a/source/Piston.cpp +++ b/source/Piston.cpp @@ -76,6 +76,9 @@ void cPiston::ExtendPiston(int pistx, int pisty, int pistz) // Already extended, bail out return; } + + m_World->BroadcastBlockAction(pistx, pisty, pistz, 0, pistonMeta, pistonBlock); + m_World->BroadcastSoundEffect("tile.piston.out", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f); int dist = FirstPassthroughBlock(pistx, pisty, pistz, pistonMeta); if (dist < 0) @@ -117,9 +120,7 @@ void cPiston::ExtendPiston(int pistx, int pisty, int pistz) AddDir(pistx, pisty, pistz, pistonMeta, -1); // "pist" now at piston body, "ext" at future extension - m_World->BroadcastBlockAction(pistx, pisty, pistz, 0, pistonMeta, pistonBlock); - m_World->BroadcastSoundEffect("tile.piston.out", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f); - m_World->FastSetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8 ); + m_World->QueueSetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8, PISTON_TICK_DELAY); m_World->QueueSetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, pistonMeta | (IsSticky(pistonBlock) ? 8 : 0), PISTON_TICK_DELAY); } @@ -139,10 +140,9 @@ void cPiston::RetractPiston(int pistx, int pisty, int pistz) } 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->BroadcastSoundEffect("tile.piston.in", pistx * 8, pisty * 8, pistz * 8, 0.5f, 0.7f); m_World->QueueSetBlock(pistx, pisty, pistz, pistonBlock, pistonMeta & ~(8), PISTON_TICK_DELAY); - // Check the extension: AddDir(pistx, pisty, pistz, pistonMeta, 1); if (m_World->GetBlock(pistx, pisty, pistz) != E_BLOCK_PISTON_EXTENSION) |