From a7b029654c524d2da85d6ab9de2e4f1ae0bcc748 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Wed, 30 Sep 2020 18:54:36 +0100 Subject: Fix boats in the new physics system --- src/Protocol/Protocol_1_9.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Protocol/Protocol_1_9.cpp') diff --git a/src/Protocol/Protocol_1_9.cpp b/src/Protocol/Protocol_1_9.cpp index c170227b5..06f0b9012 100644 --- a/src/Protocol/Protocol_1_9.cpp +++ b/src/Protocol/Protocol_1_9.cpp @@ -1707,15 +1707,15 @@ void cProtocol_1_9_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a a_Pkt.WriteBEInt8(5); // Index 6: Time since last hit a_Pkt.WriteBEInt8(METADATA_TYPE_VARINT); - a_Pkt.WriteVarInt32(static_cast(Boat.GetLastDamage())); + a_Pkt.WriteVarInt32(8); a_Pkt.WriteBEInt8(6); // Index 7: Forward direction a_Pkt.WriteBEInt8(METADATA_TYPE_VARINT); - a_Pkt.WriteVarInt32(static_cast(Boat.GetForwardDirection())); + a_Pkt.WriteVarInt32(Boat.ShouldShakeForwards() ? 1 : -1); a_Pkt.WriteBEInt8(7); // Index 8: Damage taken a_Pkt.WriteBEInt8(METADATA_TYPE_FLOAT); - a_Pkt.WriteBEFloat(Boat.GetDamageTaken()); + a_Pkt.WriteBEFloat(10 * Boat.GetDamageTaken()); a_Pkt.WriteBEInt8(8); // Index 9: Type a_Pkt.WriteBEInt8(METADATA_TYPE_VARINT); -- cgit v1.2.3