diff options
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockButton.h | 6 | ||||
-rw-r--r-- | src/Blocks/BlockLeaves.h | 4 | ||||
-rw-r--r-- | src/Blocks/ChunkInterface.cpp | 4 | ||||
-rw-r--r-- | src/Blocks/ChunkInterface.h | 10 |
4 files changed, 10 insertions, 14 deletions
diff --git a/src/Blocks/BlockButton.h b/src/Blocks/BlockButton.h index f4994f193..aba20f8a1 100644 --- a/src/Blocks/BlockButton.h +++ b/src/Blocks/BlockButton.h @@ -47,7 +47,7 @@ public: const auto SoundToPlay = (m_BlockType == E_BLOCK_STONE_BUTTON) ? "block.stone_button.click_on" : "block.wood_button.click_on"; - a_ChunkInterface.SetBlockMeta(a_BlockPos, Meta, false); + a_ChunkInterface.SetBlockMeta(a_BlockPos, Meta); a_WorldInterface.WakeUpSimulators(a_BlockPos); a_WorldInterface.GetBroadcastManager().BroadcastSoundEffect(SoundToPlay, a_BlockPos, 0.5f, 0.6f, a_Player.GetClientHandle()); @@ -185,7 +185,7 @@ public: return; } - a_World.SetBlockMeta(Pos, Meta | 0x08, false); + a_World.SetBlockMeta(Pos, Meta | 0x08); a_World.WakeUpSimulators(Pos); // sound name is ok to be wood, because only wood gets triggered by arrow @@ -228,7 +228,7 @@ private: // Block hasn't change in the meantime; release it const auto SoundToPlayOnRelease = (Type == E_BLOCK_STONE_BUTTON) ? "block.stone_button.click_off" : "block.wood_button.click_off"; - a_World.SetBlockMeta(a_Position, Meta & 0x07, false); + a_World.SetBlockMeta(a_Position, Meta & 0x07); a_World.WakeUpSimulators(a_Position); a_World.BroadcastSoundEffect(SoundToPlayOnRelease, a_Position, 0.5f, 0.5f); } diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h index c936e0405..cd2b62743 100644 --- a/src/Blocks/BlockLeaves.h +++ b/src/Blocks/BlockLeaves.h @@ -155,7 +155,7 @@ public: // Set bit 0x08, so this block gets checked for decay: if ((meta & 0x08) == 0) { - a_ChunkInterface.SetBlockMeta(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, meta | 0x8, true, false); + a_ChunkInterface.SetBlockMeta(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, meta | 0x8); } } @@ -201,7 +201,7 @@ public: if (HasNearLog(Area, worldPos)) { // Wood found, the leaves stay; unset the check bit - a_Chunk.SetMeta(a_RelPos, Meta ^ 0x08, true, false); + a_Chunk.SetMeta(a_RelPos, Meta ^ 0x08); return; } diff --git a/src/Blocks/ChunkInterface.cpp b/src/Blocks/ChunkInterface.cpp index 15198dd37..f497b94a0 100644 --- a/src/Blocks/ChunkInterface.cpp +++ b/src/Blocks/ChunkInterface.cpp @@ -57,9 +57,9 @@ void cChunkInterface::SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBL -void cChunkInterface::SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty, bool a_ShouldInformClient) +void cChunkInterface::SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData) { - m_ChunkMap->SetBlockMeta(a_BlockPos, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClient); + m_ChunkMap->SetBlockMeta(a_BlockPos, a_MetaData); } diff --git a/src/Blocks/ChunkInterface.h b/src/Blocks/ChunkInterface.h index 6ee54b17f..3017df8ab 100644 --- a/src/Blocks/ChunkInterface.h +++ b/src/Blocks/ChunkInterface.h @@ -45,19 +45,15 @@ public: } /** Sets the meta for the specified block, while keeping the blocktype. - If a_ShouldMarkDirty is true, the chunk is marked dirty by this change (false is used eg. by water turning still). - If a_ShouldInformClients is true, the change is broadcast to all clients of the chunk. Ignored if the chunk is invalid. */ - void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty = true, bool a_ShouldInformClient = true); + void SetBlockMeta(Vector3i a_BlockPos, NIBBLETYPE a_MetaData); /** OBSOLETE, Use the Vector3-based overload instead. Sets the meta for the specified block, while keeping the blocktype. - If a_ShouldMarkDirty is true, the chunk is marked dirty by this change (false is used eg. by water turning still). - If a_ShouldInformClients is true, the change is broadcast to all clients of the chunk. Ignored if the chunk is invalid. */ - void SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData, bool a_ShouldMarkDirty = true, bool a_ShouldInformClient = true) + void SetBlockMeta(int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData) { - return SetBlockMeta({a_BlockX, a_BlockY, a_BlockZ}, a_MetaData, a_ShouldMarkDirty, a_ShouldInformClient); + return SetBlockMeta({a_BlockX, a_BlockY, a_BlockZ}, a_MetaData); } /** Sets the block at the specified coords to the specified value. |