summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-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);
+ }
}