summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorJan-Fabian Humann <j.f.humann@gmail.com>2014-03-08 17:55:53 +0100
committerJan-Fabian Humann <j.f.humann@gmail.com>2014-03-08 17:55:53 +0100
commit66970fe943ccc414c2f4fb722852f0461b8ddca2 (patch)
treeed732e738fe70cc71898c42993a7adccb39f08c1 /src/Protocol/Protocol17x.cpp
parentMerge pull request #764 from xdot/master (diff)
downloadcuberite-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.cpp22
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);
+ }
}