diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-01-26 15:20:39 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-01-26 15:20:39 +0100 |
commit | 14e48ccb4bbad6f43121dc27f042083cda160f45 (patch) | |
tree | 96df772125eb96f79bf76226e5df91b4e2b99696 /src/Blocks/BlockButton.h | |
parent | Added support for overide in c++11 supporting varients of gcc/clang (diff) | |
download | cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.gz cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.bz2 cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.lz cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.xz cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.tar.zst cuberite-14e48ccb4bbad6f43121dc27f042083cda160f45.zip |
Diffstat (limited to 'src/Blocks/BlockButton.h')
-rw-r--r-- | src/Blocks/BlockButton.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h index 7d75c5bad..53c905576 100644 --- a/src/Blocks/BlockButton.h +++ b/src/Blocks/BlockButton.h @@ -16,16 +16,16 @@ public: } - virtual void OnUse(cWorld * a_World, cWorldInterface * a_WorldInterface, 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 + virtual void OnUse(cChunkInterface * a_ChunkInterface, cWorldInterface * a_WorldInterface, 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 { // Set p the ON bit to on - NIBBLETYPE Meta = (a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) | 0x08); + NIBBLETYPE Meta = (a_ChunkInterface->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); + a_ChunkInterface->SetBlockMeta(a_BlockX, a_BlockY, a_BlockZ, Meta); + a_WorldInterface->GetBroadcastManager()->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, m_BlockType); + a_ChunkInterface->QueueSetBlock(a_BlockX, a_BlockY, a_BlockZ, m_BlockType, (a_ChunkInterface->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ) & 0x07), m_BlockType == E_BLOCK_STONE_BUTTON ? 20 : 30, m_BlockType, a_WorldInterface); } @@ -43,7 +43,7 @@ public: virtual bool GetPlacementBlockTypeMeta( - cWorld * a_World, cPlayer * a_Player, + cChunkInterface * a_ChunkInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta |