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/Protocol/Protocol17x.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/Protocol/Protocol17x.cpp') diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index fdebdbbb1..2704a4393 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1152,27 +1152,13 @@ void cProtocol172::HandlePacketBlockPlace(UInt32 a_RemainingBytes) HANDLE_READ(ReadByte, Byte, BlockY); HANDLE_READ(ReadBEInt, int, BlockZ); HANDLE_READ(ReadByte, Byte, Face); - HANDLE_READ(ReadBEShort, short, ItemID); - - // Currently discarding extra info until it is decided what we do with it - if (ItemID != -1) - { - HANDLE_READ(ReadByte, Byte, Count); - HANDLE_READ(ReadBEShort, short, ItemDamage); - HANDLE_READ(ReadBEShort, short, MetaLen); - if (MetaLen != -1) - { - while(MetaLen--) - { - HANDLE_READ(ReadByte, Byte, MetaStuff); - } - } - - } + cItem Item; + ReadItem(Item); HANDLE_READ(ReadByte, Byte, CursorX); HANDLE_READ(ReadByte, Byte, CursorY); HANDLE_READ(ReadByte, Byte, CursorZ); + printf("Cursor: %i %i %i\n", CursorX, CursorY, CursorZ); m_Client->HandleRightClick(BlockX, BlockY, BlockZ, Face, CursorX, CursorY, CursorZ, m_Client->GetPlayer()->GetEquippedItem()); } -- cgit v1.2.3