mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
ba5a9f2b36
commit
ffb17f1c9a
25 changed files with 67 additions and 136 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue