summaryrefslogtreecommitdiffstats
path: root/source/cClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cClientHandle.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 966270321..96ee3fcbd 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -939,14 +939,19 @@ void cClientHandle::HandleBlockPlace(cPacket_BlockPlace * a_Packet)
if (a_Packet->m_Direction >= 0)
{
- ENUM_BLOCK_ID BlockID = (ENUM_BLOCK_ID)m_Player->GetWorld()->GetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ);
- switch (BlockID)
+ cWorld * World = m_Player->GetWorld();
+ BLOCKTYPE BlockType = 0;
+ NIBBLETYPE BlockMeta;
+ World->GetBlockTypeMeta(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, BlockType, BlockMeta);
+ switch (BlockType)
{
case E_BLOCK_REDSTONE_REPEATER_ON:
case E_BLOCK_REDSTONE_REPEATER_OFF:
{
// no need to update redstone current with a repeater
- // TODO: Find meta value of repeater and change it to one step more.
+ // Find meta value of repeater and change it to one step more:
+ World->FastSetBlock(a_Packet->m_PosX, a_Packet->m_PosY, a_Packet->m_PosZ, BlockType, ((BlockMeta + 0x04) & 0x0f));
+ bPlaceBlock = false;
break;
}