summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-12 07:39:39 +0100
committermadmaxoft <github@xoft.cz>2014-03-12 07:39:39 +0100
commit3e9f265a368fad0f8097ec68681853e0859ea240 (patch)
treecd24727b0ff02d104eee23f44e92174aec977054 /src/Protocol/Protocol16x.cpp
parentFixed APIDump (diff)
parentMerge pull request #791 from mc-server/PieceGenerator (diff)
downloadcuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar.gz
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar.bz2
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar.lz
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar.xz
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.tar.zst
cuberite-3e9f265a368fad0f8097ec68681853e0859ea240.zip
Diffstat (limited to 'src/Protocol/Protocol16x.cpp')
-rw-r--r--src/Protocol/Protocol16x.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Protocol/Protocol16x.cpp b/src/Protocol/Protocol16x.cpp
index cfa27b3c4..f6ec0a199 100644
--- a/src/Protocol/Protocol16x.cpp
+++ b/src/Protocol/Protocol16x.cpp
@@ -184,7 +184,16 @@ 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);
+
+ switch (ActionID)
+ {
+ case 1: m_Client->HandleEntityCrouch(EntityID, true); break; // Crouch
+ case 2: m_Client->HandleEntityCrouch(EntityID, false); break; // Uncrouch
+ case 3: m_Client->HandleEntityLeaveBed(EntityID); break; // Leave Bed
+ case 4: m_Client->HandleEntitySprinting(EntityID, true); break; // Start sprinting
+ case 5: m_Client->HandleEntitySprinting(EntityID, false); break; // Stop sprinting
+ }
+
return PARSE_OK;
}