From 43e684071933adef93040e8d4b830d5c6b71cf9a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 12 Jan 2013 04:46:01 +0000 Subject: Merged branch "branches/hooks" into "trunk". git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/Protocol125.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/Protocol/Protocol125.cpp') diff --git a/source/Protocol/Protocol125.cpp b/source/Protocol/Protocol125.cpp index 0b5acc771..0bed151ed 100644 --- a/source/Protocol/Protocol125.cpp +++ b/source/Protocol/Protocol125.cpp @@ -978,8 +978,8 @@ int cProtocol125::ParseBlockDig(void) HANDLE_PACKET_READ(ReadBEInt, int, PosX); HANDLE_PACKET_READ(ReadByte, Byte, PosY); HANDLE_PACKET_READ(ReadBEInt, int, PosZ); - HANDLE_PACKET_READ(ReadChar, char, Direction); - m_Client->HandleBlockDig(PosX, PosY, PosZ, Direction, Status); + HANDLE_PACKET_READ(ReadChar, char, BlockFace); + m_Client->HandleLeftClick(PosX, PosY, PosZ, BlockFace, Status); return PARSE_OK; } @@ -992,7 +992,7 @@ int cProtocol125::ParseBlockPlace(void) HANDLE_PACKET_READ(ReadBEInt, int, PosX); HANDLE_PACKET_READ(ReadByte, Byte, PosY); HANDLE_PACKET_READ(ReadBEInt, int, PosZ); - HANDLE_PACKET_READ(ReadChar, char, Direction); + HANDLE_PACKET_READ(ReadChar, char, BlockFace); cItem HeldItem; int res = ParseItem(HeldItem); @@ -1001,7 +1001,8 @@ int cProtocol125::ParseBlockPlace(void) return res; } - m_Client->HandleBlockPlace(PosX, PosY, PosZ, Direction, HeldItem); + // 1.2.5 didn't have any cursor position, so use 8, 8, 8, so that halfslabs and stairs work correctly and the special value is recognizable. + m_Client->HandleRightClick(PosX, PosY, PosZ, BlockFace, 8, 8, 8, HeldItem); return PARSE_OK; } -- cgit v1.2.3