summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-24 23:22:16 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-24 23:22:16 +0100
commit6fec5f811c6afef9df2576e83b56b9b84326db44 (patch)
treef5ecb3b67f17b5d4f5e303ebd23e687cfd278f9b
parentAdded the 1.4.6 protocol (diff)
downloadcuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar.gz
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar.bz2
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar.lz
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar.xz
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.tar.zst
cuberite-6fec5f811c6afef9df2576e83b56b9b84326db44.zip
-rw-r--r--ProtoProxy/Connection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ProtoProxy/Connection.cpp b/ProtoProxy/Connection.cpp
index 3037f10cd..aba0c8255 100644
--- a/ProtoProxy/Connection.cpp
+++ b/ProtoProxy/Connection.cpp
@@ -1696,12 +1696,16 @@ bool cConnection::HandleServerSpawnObjectVehicle(void)
HANDLE_SERVER_PACKET_READ(ReadBEInt, int, DataIndicator);
AString ExtraData;
short VelocityX, VelocityY, VelocityZ;
+ Byte Yaw, Pitch;
if (DataIndicator != 0)
{
HANDLE_SERVER_PACKET_READ(ReadBEShort, short, SpeedX);
HANDLE_SERVER_PACKET_READ(ReadBEShort, short, SpeedY);
HANDLE_SERVER_PACKET_READ(ReadBEShort, short, SpeedZ);
+ HANDLE_SERVER_PACKET_READ(ReadByte, Byte, LocalYaw);
+ HANDLE_SERVER_PACKET_READ(ReadByte, Byte, LocalPitch);
VelocityX = SpeedX; VelocityY = SpeedY; VelocityZ = SpeedZ; // Speed vars are local to this scope, but we need them available later
+ Yaw = LocalYaw; Pitch = LocalPitch;
/*
// This doesn't seem to work - for a falling block I'm getting no extra data at all
int ExtraLen = 0;
@@ -1733,6 +1737,7 @@ bool cConnection::HandleServerSpawnObjectVehicle(void)
if (DataIndicator != 0)
{
Log(" Velocity = <%d, %d, %d>", VelocityX, VelocityY, VelocityZ);
+ Log(" Rotation = <yaw %d, pitch %d>", Yaw, Pitch);
DataLog(ExtraData.data(), ExtraData.size(), " ExtraData size = %d", ExtraData.size());
}
COPY_TO_CLIENT();