From ffb17f1c9a203fea6de70159b461f52d104e05b9 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Mon, 11 Feb 2019 00:03:26 +0100 Subject: Consistent HP and damage types (#8167) Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter. --- src/object_properties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/object_properties.cpp') diff --git a/src/object_properties.cpp b/src/object_properties.cpp index e08eca7c9..a037c5f65 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -75,7 +75,7 @@ std::string ObjectProperties::dump() void ObjectProperties::serialize(std::ostream &os) const { writeU8(os, 4); // PROTOCOL_VERSION >= 37 - writeS16(os, hp_max); + writeU16(os, hp_max); writeU8(os, physical); writeF32(os, weight); writeV3F32(os, collisionbox.MinEdge); @@ -126,7 +126,7 @@ void ObjectProperties::deSerialize(std::istream &is) if (version != 4) throw SerializationError("unsupported ObjectProperties version"); - hp_max = readS16(is); + hp_max = readU16(is); physical = readU8(is); weight = readF32(is); collisionbox.MinEdge = readV3F32(is); -- cgit v1.2.3