mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow rotating entity selectionboxes (#12379)
This commit is contained in:
parent
b829231992
commit
077627181e
18 changed files with 271 additions and 58 deletions
|
@ -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) {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue