summaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-02-11 00:03:26 +0100
committerParamat <paramat@users.noreply.github.com>2019-02-10 23:03:26 +0000
commitffb17f1c9a203fea6de70159b461f52d104e05b9 (patch)
treeca2c9f26515b8c6dad2a42b7e09f5d2a91d6f398 /src/object_properties.cpp
parentba5a9f2b361a2fa01d1a3396999a5833983c0f4a (diff)
downloadminetest-ffb17f1c9a203fea6de70159b461f52d104e05b9.tar.gz
minetest-ffb17f1c9a203fea6de70159b461f52d104e05b9.tar.bz2
minetest-ffb17f1c9a203fea6de70159b461f52d104e05b9.zip
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.
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp4
1 files changed, 2 insertions, 2 deletions
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);