summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol16x.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-05 23:11:06 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-07-05 23:11:06 +0200
commit37590c4bd8f293ca11dd5ad351f241b7636b67cb (patch)
tree3e416cc25dd94ae3e4864d9a541b0752a1cab5ac /source/Protocol/Protocol16x.cpp
parentFixed 1.6.1's movement speed (diff)
downloadcuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar.gz
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar.bz2
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar.lz
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar.xz
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.tar.zst
cuberite-37590c4bd8f293ca11dd5ad351f241b7636b67cb.zip
Diffstat (limited to 'source/Protocol/Protocol16x.cpp')
-rw-r--r--source/Protocol/Protocol16x.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/Protocol/Protocol16x.cpp b/source/Protocol/Protocol16x.cpp
index 8c93d6052..d7237b47a 100644
--- a/source/Protocol/Protocol16x.cpp
+++ b/source/Protocol/Protocol16x.cpp
@@ -37,6 +37,7 @@ enum
{
PACKET_CHAT = 0x03,
PACKET_UPDATE_HEALTH = 0x08,
+ PACKET_STEER_VEHICLE = 0x1b,
PACKET_ATTACH_ENTITY = 0x27,
PACKET_ENTITY_PROPERTIES = 0x2c,
PACKET_WINDOW_OPEN = 0x64,
@@ -161,3 +162,34 @@ int cProtocol161::ParsePlayerAbilities(void)
+
+int cProtocol161::ParseSteerVehicle(void)
+{
+ HANDLE_PACKET_READ(ReadBEFloat, float, Sideways);
+ HANDLE_PACKET_READ(ReadBEFloat, float, Forward);
+ HANDLE_PACKET_READ(ReadBool, bool, Jump);
+ HANDLE_PACKET_READ(ReadBool, bool, Unmount);
+ // TODO: m_Client->HandleSteerVehicle(...);
+ if (Unmount)
+ {
+ m_Client->HandleUnmount();
+ }
+ return PARSE_OK;
+}
+
+
+
+
+
+int cProtocol161::ParsePacket(unsigned char a_PacketType)
+{
+ switch (a_PacketType)
+ {
+ case PACKET_STEER_VEHICLE: return ParseSteerVehicle();
+ default: return super::ParsePacket(a_PacketType);
+ }
+}
+
+
+
+