summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_9.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-30 19:54:36 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-30 19:54:36 +0200
commita7b029654c524d2da85d6ab9de2e4f1ae0bcc748 (patch)
treef3dd2cfaa14ea5a0600aebd3edaf597cc2d069fa /src/Protocol/Protocol_1_9.cpp
parentExplodinator: fix division by zero (diff)
downloadcuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.gz
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.bz2
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.lz
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.xz
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.tar.zst
cuberite-a7b029654c524d2da85d6ab9de2e4f1ae0bcc748.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_9.cpp6
1 files changed, 3 insertions, 3 deletions
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<UInt32>(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<UInt32>(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);