diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-09 01:04:42 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-02-09 01:04:42 +0100 |
commit | f86f066615f4e4807941f863f6e749dc12ac01be (patch) | |
tree | a792dc877470a98030569204b3d32575da404d6d /src/Protocol | |
parent | Fixed a boat ASSERT (diff) | |
parent | Fixed a gcc warning in ManualBindings. (diff) | |
download | cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar.gz cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar.bz2 cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar.lz cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar.xz cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.tar.zst cuberite-f86f066615f4e4807941f863f6e749dc12ac01be.zip |
Diffstat (limited to 'src/Protocol')
-rw-r--r-- | src/Protocol/Protocol125.cpp | 4 | ||||
-rw-r--r-- | src/Protocol/Protocol132.cpp | 2 | ||||
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Protocol/Protocol125.cpp b/src/Protocol/Protocol125.cpp index 323a13992..73d21161c 100644 --- a/src/Protocol/Protocol125.cpp +++ b/src/Protocol/Protocol125.cpp @@ -1211,7 +1211,7 @@ int cProtocol125::ParseBlockDig(void) HANDLE_PACKET_READ(ReadByte, Byte, PosY); HANDLE_PACKET_READ(ReadBEInt, int, PosZ); HANDLE_PACKET_READ(ReadChar, char, BlockFace); - m_Client->HandleLeftClick(PosX, PosY, PosZ, BlockFace, Status); + m_Client->HandleLeftClick(PosX, PosY, PosZ, static_cast<eBlockFace>(BlockFace), Status); return PARSE_OK; } @@ -1234,7 +1234,7 @@ int cProtocol125::ParseBlockPlace(void) } // 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); + m_Client->HandleRightClick(PosX, PosY, PosZ, static_cast<eBlockFace>(BlockFace), 8, 8, 8, HeldItem); return PARSE_OK; } diff --git a/src/Protocol/Protocol132.cpp b/src/Protocol/Protocol132.cpp index f5fd95c7e..648e70151 100644 --- a/src/Protocol/Protocol132.cpp +++ b/src/Protocol/Protocol132.cpp @@ -476,7 +476,7 @@ int cProtocol132::ParseBlockPlace(void) HANDLE_PACKET_READ(ReadChar, char, CursorY); HANDLE_PACKET_READ(ReadChar, char, CursorZ); - m_Client->HandleRightClick(PosX, PosY, PosZ, BlockFace, CursorX, CursorY, CursorZ, HeldItem); + m_Client->HandleRightClick(PosX, PosY, PosZ, static_cast<eBlockFace>(BlockFace), CursorX, CursorY, CursorZ, HeldItem); return PARSE_OK; } diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index eb42e9299..262ee4c0e 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1479,8 +1479,8 @@ void cProtocol172::HandlePacketBlockDig(cByteBuffer & a_ByteBuffer) HANDLE_READ(a_ByteBuffer, ReadBEInt, int, BlockX); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, BlockY); HANDLE_READ(a_ByteBuffer, ReadBEInt, int, BlockZ); - HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Face); - m_Client->HandleLeftClick(BlockX, BlockY, BlockZ, Face, Status); + HANDLE_READ(a_ByteBuffer, ReadChar, char, Face); + m_Client->HandleLeftClick(BlockX, BlockY, BlockZ, static_cast<eBlockFace>(Face), Status); } @@ -1492,14 +1492,14 @@ void cProtocol172::HandlePacketBlockPlace(cByteBuffer & a_ByteBuffer) HANDLE_READ(a_ByteBuffer, ReadBEInt, int, BlockX); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, BlockY); HANDLE_READ(a_ByteBuffer, ReadBEInt, int, BlockZ); - HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Face); + HANDLE_READ(a_ByteBuffer, ReadChar, char, Face); cItem Item; ReadItem(a_ByteBuffer, Item); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, CursorX); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, CursorY); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, CursorZ); - m_Client->HandleRightClick(BlockX, BlockY, BlockZ, Face, CursorX, CursorY, CursorZ, m_Client->GetPlayer()->GetEquippedItem()); + m_Client->HandleRightClick(BlockX, BlockY, BlockZ, static_cast<eBlockFace>(Face), CursorX, CursorY, CursorZ, m_Client->GetPlayer()->GetEquippedItem()); } |