summaryrefslogtreecommitdiffstats
path: root/source/Blocks/BlockLever.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-22 20:16:56 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-09-22 20:16:56 +0200
commit5c22a9f5f0e1e072eb9034a79e3bfc465822deab (patch)
tree8599987620c943e0d4f20ef980758214c7cff74a /source/Blocks/BlockLever.cpp
parentIncrease piston delay to a second (diff)
downloadcuberite-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 '')
-rw-r--r--source/Blocks/BlockLever.cpp10
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);
-}
-
-
-
-