diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-22 20:16:56 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2013-09-22 20:16:56 +0200 |
commit | 5c22a9f5f0e1e072eb9034a79e3bfc465822deab (patch) | |
tree | 8599987620c943e0d4f20ef980758214c7cff74a /source/Blocks/BlockLever.cpp | |
parent | Increase piston delay to a second (diff) | |
download | cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.gz cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.bz2 cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.lz cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.xz cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.tar.zst cuberite-5c22a9f5f0e1e072eb9034a79e3bfc465822deab.zip |
Diffstat (limited to 'source/Blocks/BlockLever.cpp')
-rw-r--r-- | source/Blocks/BlockLever.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/Blocks/BlockLever.cpp b/source/Blocks/BlockLever.cpp index bd70cfd1b..96b5fc368 100644 --- a/source/Blocks/BlockLever.cpp +++ b/source/Blocks/BlockLever.cpp @@ -23,6 +23,7 @@ void cBlockLeverHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX, { // Flip the ON bit on/off. Using XOR bitwise operation to turn it on/off. NIBBLETYPE Meta = ((a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) ^ 0x08) & 0x0f); + a_World->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta); if (Meta & 0x08) { @@ -37,12 +38,3 @@ void cBlockLeverHandler::OnUse(cWorld *a_World, cPlayer *a_Player, int a_BlockX, - -void cBlockLeverHandler::OnDigging(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) -{ - OnUse(a_World, a_Player, a_BlockX, a_BlockY, a_BlockZ, BLOCK_FACE_NONE, 8, 8, 8); -} - - - - |