summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol_1_8.cpp
diff options
context:
space:
mode:
authorFabian <fenstein12@googlemail.com>2017-11-22 14:47:52 +0100
committerAlexander Harkness <me@bearbin.net>2017-11-22 14:47:52 +0100
commit0dd172b80ffc949cf87119ad2003589d7eb82c46 (patch)
treea7af747aa95241297f07104c138cfc66cf7f6c97 /src/Protocol/Protocol_1_8.cpp
parentcBlockRail: Fix assertion failure (#4075) (diff)
downloadcuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar.gz
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar.bz2
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar.lz
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar.xz
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.tar.zst
cuberite-0dd172b80ffc949cf87119ad2003589d7eb82c46.zip
Diffstat (limited to '')
-rw-r--r--src/Protocol/Protocol_1_8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp
index e7f197d3d..ec5a9440b 100644
--- a/src/Protocol/Protocol_1_8.cpp
+++ b/src/Protocol/Protocol_1_8.cpp
@@ -3310,7 +3310,7 @@ void cProtocol_1_8_0::WriteEntityMetadata(cPacketizer & a_Pkt, const cEntity & a
Health: 1 | 3 - (1 - 3) = 5
*/
auto & Minecart = reinterpret_cast<const cMinecart &>(a_Entity);
- a_Pkt.WriteBEInt32((((a_Entity.GetMaxHealth() / 2) - (a_Entity.GetHealth() - (a_Entity.GetMaxHealth() / 2))) * Minecart.LastDamage()) * 4);
+ a_Pkt.WriteBEInt32(static_cast<Int32>((((a_Entity.GetMaxHealth() / 2) - (a_Entity.GetHealth() - (a_Entity.GetMaxHealth() / 2))) * Minecart.LastDamage()) * 4));
a_Pkt.WriteBEUInt8(0x52);
a_Pkt.WriteBEInt32(1); // Shaking direction, doesn't seem to affect anything
a_Pkt.WriteBEUInt8(0x73);