summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-06 23:29:15 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-06 23:29:15 +0100
commitb02873172639db2ac7a494389899c2175e0ddd8f (patch)
tree45f828ac294097525ba070cbd88fa503c57aa4e6 /src/Blocks
parentAdded trapdoor cursor Y detection (diff)
downloadcuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar.gz
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar.bz2
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar.lz
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar.xz
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.tar.zst
cuberite-b02873172639db2ac7a494389899c2175e0ddd8f.zip
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockButton.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h
index ec897835a..c898a0466 100644
--- a/src/Blocks/BlockButton.h
+++ b/src/Blocks/BlockButton.h
@@ -18,14 +18,14 @@ public:
virtual void OnUse(cWorld * a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override
{
- // Flip the ON bit on/off using the XOR bitwise operation
+ // Set p the ON bit to on
NIBBLETYPE Meta = (a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x08);
a_World->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta);
a_World->BroadcastSoundEffect("random.click", a_BlockX * 8, a_BlockY * 8, a_BlockZ * 8, 0.5f, (Meta & 0x08) ? 0.6f : 0.5f);
// Queue a button reset (unpress)
- a_World->QueueSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, (a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x07), m_BlockType == E_BLOCK_STONE_BUTTON ? 20 : 30);
+ a_World->QueueSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, (a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x07), m_BlockType == E_BLOCK_STONE_BUTTON ? 20 : 30, m_BlockType);
}