diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-07 19:03:56 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-12-07 19:03:56 +0100 |
commit | 5bed85aba0720dc22db56dcaec28675c189491c4 (patch) | |
tree | 0b48aac460633e5d0410acf45f591c08ae51ce11 /src/Piston.cpp | |
parent | Changed some FastSetBlocks to SetBlock (diff) | |
download | cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar.gz cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar.bz2 cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar.lz cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar.xz cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.tar.zst cuberite-5bed85aba0720dc22db56dcaec28675c189491c4.zip |
Diffstat (limited to 'src/Piston.cpp')
-rw-r--r-- | src/Piston.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Piston.cpp b/src/Piston.cpp index 63ffbad0b..b893af73a 100644 --- a/src/Piston.cpp +++ b/src/Piston.cpp @@ -113,7 +113,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->SetBlock( pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8); + m_World->SetBlock(pistx, pisty, pistz, pistonBlock, pistonMeta | 0x8); m_World->QueueSetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, pistonMeta | (IsSticky(pistonBlock) ? 8 : 0), PISTON_TICK_DELAY); } @@ -126,6 +126,7 @@ void cPiston::RetractPiston(int pistx, int pisty, int pistz) BLOCKTYPE pistonBlock; NIBBLETYPE pistonMeta; m_World->GetBlockTypeMeta(pistx, pisty, pistz, pistonBlock, pistonMeta); + if (!IsExtended(pistonMeta)) { // Already retracted, bail out |