summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Protocol/Protocol16x.cpp')
-rw-r--r--src/Protocol/Protocol16x.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/Protocol/Protocol16x.cpp b/src/Protocol/Protocol16x.cpp
index cfa27b3c4..6a41a577f 100644
--- a/src/Protocol/Protocol16x.cpp
+++ b/src/Protocol/Protocol16x.cpp
@@ -184,7 +184,28 @@ int cProtocol161::ParseEntityAction(void)
HANDLE_PACKET_READ(ReadBEInt, int, EntityID);
HANDLE_PACKET_READ(ReadChar, char, ActionID);
HANDLE_PACKET_READ(ReadBEInt, int, UnknownHorseVal);
- m_Client->HandleEntityAction(EntityID, ActionID);
+
+ if (ActionID == 1) // Crouch
+ {
+ m_Client->HandleEntityCrouch(EntityID, true);
+ }
+ else if (ActionID == 2) // Uncrouch
+ {
+ m_Client->HandleEntityCrouch(EntityID, false);
+ }
+ else if (ActionID == 3) // Leave Bed
+ {
+ m_Client->HandleEntityLeaveBed(EntityID);
+ }
+ else if (ActionID == 4) // Start sprinting
+ {
+ m_Client->HandleEntitySprinting(EntityID, true);
+ }
+ else if (ActionID == 5) // Stop sprinting
+ {
+ m_Client->HandleEntitySprinting(EntityID, false);
+ }
+
return PARSE_OK;
}