diff options
author | Lars Müller <34514239+appgurueu@users.noreply.github.com> | 2022-10-30 16:53:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 16:53:14 +0100 |
commit | 077627181ee2eac3c0dacc3d8dc49825837e474c (patch) | |
tree | a8a6298198738f2edb30bd7e733a7a0d2005affa /src/object_properties.cpp | |
parent | b8292319924994352d56d6111faa73fe315d149a (diff) | |
download | minetest-077627181ee2eac3c0dacc3d8dc49825837e474c.tar.xz |
Allow rotating entity selectionboxes (#12379)
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r-- | src/object_properties.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp index c7f6becf0..e4c656946 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -72,6 +72,7 @@ std::string ObjectProperties::dump() os << ", nametag_bgcolor=null "; os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge); + os << ", rotate_selectionbox=" << rotate_selectionbox; os << ", pointable=" << pointable; os << ", static_save=" << static_save; os << ", eye_height=" << eye_height; @@ -169,6 +170,7 @@ void ObjectProperties::serialize(std::ostream &os) const else writeARGB8(os, nametag_bgcolor.value()); + writeU8(os, rotate_selectionbox); // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this } @@ -236,5 +238,10 @@ void ObjectProperties::deSerialize(std::istream &is) nametag_bgcolor = bgcolor; else nametag_bgcolor = nullopt; + + tmp = readU8(is); + if (is.eof()) + return; + rotate_selectionbox = tmp; } catch (SerializationError &e) {} } |