mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Zoom: Move enabling zoom to a new player object property
Default enabled for no change in default behaviour. Remove 'zoom' privilege.
This commit is contained in:
parent
bd6b90359c
commit
561a01cc2a
8 changed files with 20 additions and 11 deletions
|
@ -63,6 +63,7 @@ std::string ObjectProperties::dump()
|
|||
<< "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
|
||||
os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge);
|
||||
os << ", pointable=" << pointable;
|
||||
os << ", can_zoom=" << can_zoom;
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
@ -104,6 +105,7 @@ void ObjectProperties::serialize(std::ostream &os) const
|
|||
writeF1000(os, automatic_face_movement_max_rotation_per_sec);
|
||||
os << serializeString(infotext);
|
||||
os << serializeString(wield_item);
|
||||
writeU8(os, can_zoom);
|
||||
|
||||
// Add stuff only at the bottom.
|
||||
// Never remove anything, because we don't want new versions of this
|
||||
|
@ -150,4 +152,5 @@ void ObjectProperties::deSerialize(std::istream &is)
|
|||
automatic_face_movement_max_rotation_per_sec = readF1000(is);
|
||||
infotext = deSerializeString(is);
|
||||
wield_item = deSerializeString(is);
|
||||
can_zoom = readU8(is);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue