diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-27 08:15:26 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-27 08:15:26 +0100 |
commit | 01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d (patch) | |
tree | c95fe49783312d337ccf1b206d40030013cbaa18 | |
parent | ProtoProxy: Fixed 1.4.6 compatibility with vehicles, logging for entity metadata. (diff) | |
download | cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar.gz cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar.bz2 cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar.lz cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar.xz cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.tar.zst cuberite-01e4d0bd051b30d5f82a60c16ae98c89ff69bc4d.zip |
-rw-r--r-- | source/Protocol/Protocol14x.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/source/Protocol/Protocol14x.cpp b/source/Protocol/Protocol14x.cpp index d9be4948c..1cb4c922d 100644 --- a/source/Protocol/Protocol14x.cpp +++ b/source/Protocol/Protocol14x.cpp @@ -188,7 +188,7 @@ void cProtocol146::SendPickupSpawn(const cPickup & a_Pickup) void cProtocol146::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock)
{
- // Send two packets - spawn object, then entity metadata
+ // Send a spawn object / vehicle packet
cCSLock Lock(m_CSPacket);
WriteByte(PACKET_SPAWN_OBJECT);
@@ -197,20 +197,12 @@ void cProtocol146::SendSpawnFallingBlock(const cFallingBlock & a_FallingBlock) WriteInt ((int)(a_FallingBlock.GetPosX() * 32));
WriteInt ((int)(a_FallingBlock.GetPosY() * 32));
WriteInt ((int)(a_FallingBlock.GetPosZ() * 32));
- WriteInt (0x800000);
- WriteShort(0);
- WriteShort(0);
- WriteShort(0);
- WriteByte (0);
- WriteByte (0);
-
- // TODO: This still doesn't work, although it is exactly the same that the vanilla server sends. WTF?
- WriteByte(PACKET_ENTITY_METADATA);
- WriteInt(a_FallingBlock.GetUniqueID());
- WriteByte(0xaa); // a slot value at index 10
- cItem Item(a_FallingBlock.GetBlockType(), 1);
- WriteItem(Item);
- WriteByte(0x7f); // End of metadata
+ WriteByte (0); // Yaw
+ WriteByte (0); // Pitch
+ WriteInt (a_FallingBlock.GetBlockType()); // data indicator = blocktype
+ WriteShort(0); // SpeedX
+ WriteShort(0); // SpeedY
+ WriteShort(0); // SpeedZ
Flush();
}
|