diff options
author | Jan-Fabian Humann <j.f.humann@gmail.com> | 2014-03-08 17:55:53 +0100 |
---|---|---|
committer | Jan-Fabian Humann <j.f.humann@gmail.com> | 2014-03-08 17:55:53 +0100 |
commit | 66970fe943ccc414c2f4fb722852f0461b8ddca2 (patch) | |
tree | ed732e738fe70cc71898c42993a7adccb39f08c1 /src/Protocol/Protocol17x.cpp | |
parent | Merge pull request #764 from xdot/master (diff) | |
download | cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar.gz cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar.bz2 cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar.lz cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar.xz cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.tar.zst cuberite-66970fe943ccc414c2f4fb722852f0461b8ddca2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol17x.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp index 18646254f..19998a483 100644 --- a/src/Protocol/Protocol17x.cpp +++ b/src/Protocol/Protocol17x.cpp @@ -1732,7 +1732,27 @@ void cProtocol172::HandlePacketEntityAction(cByteBuffer & a_ByteBuffer) HANDLE_READ(a_ByteBuffer, ReadBEInt, int, PlayerID); HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Action); HANDLE_READ(a_ByteBuffer, ReadBEInt, int, JumpBoost); - m_Client->HandleEntityAction(PlayerID, Action); + + if (Action == 1) // Crouch + { + m_Client->HandleEntityCrouch(PlayerID, true); + } + else if (Action == 2) // Uncrouch + { + m_Client->HandleEntityCrouch(PlayerID, false); + } + else if (Action == 3) // Leave Bed + { + m_Client->HandleEntityLeaveBed(PlayerID); + } + else if (Action == 4) // Start sprinting + { + m_Client->HandleEntitySprinting(PlayerID, true); + } + else if (Action == 5) // Stop sprinting + { + m_Client->HandleEntitySprinting(PlayerID, false); + } } |