From 050702eaa14180b1821e141203f613d9fc31805f Mon Sep 17 00:00:00 2001 From: Samuel Barney Date: Mon, 2 Dec 2013 09:32:28 -0700 Subject: Switched to using provided ReadItem function. Fixed misplacing when clicking on the bottom of bottom slabs and the top of top slabs. --- src/ClientHandle.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ClientHandle.cpp') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index f9a48003e..95d8f23e5 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -887,6 +887,15 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, c ) { // Coordinates at CLICKED block, don't move them anywhere + if((ClickedBlockMeta & 0x08) && (a_BlockFace == BLOCK_FACE_TOP)) + { + ++a_BlockY; + } + else if (!(ClickedBlockMeta & 0x08) && (a_BlockFace == BLOCK_FACE_BOTTOM)) + { + --a_BlockY; + } + World->GetBlockTypeMeta(a_BlockX, a_BlockY, a_BlockZ, ClickedBlock, ClickedBlockMeta); } else { -- cgit v1.2.3