summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-03-09 15:13:27 +0100
committerMattes D <github@xoft.cz>2014-03-09 15:13:27 +0100
commitd3c38c40e4cebd6a69869005fb0863b8d6085949 (patch)
tree0eae42ee4e07efd5df42029b66cc3faab808265d /src/Protocol/Protocol17x.cpp
parentMerge pull request #775 from worktycho/warnings (diff)
parentAdjusted style of switch/case (diff)
downloadcuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar.gz
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar.bz2
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar.lz
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar.xz
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.tar.zst
cuberite-d3c38c40e4cebd6a69869005fb0863b8d6085949.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 8e0d33227..a72da776d 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1732,7 +1732,15 @@ 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);
+
+ switch (Action)
+ {
+ case 1: m_Client->HandleEntityCrouch(PlayerID, true); break; // Crouch
+ case 2: m_Client->HandleEntityCrouch(PlayerID, false); break; // Uncrouch
+ case 3: m_Client->HandleEntityLeaveBed(PlayerID); break; // Leave Bed
+ case 4: m_Client->HandleEntitySprinting(PlayerID, true); break; // Start sprinting
+ case 5: m_Client->HandleEntitySprinting(PlayerID, false); break; // Stop sprinting
+ }
}