summaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-08-28 22:46:12 +0100
committerparamat <mat.gregory@virginmedia.com>2017-08-30 19:39:05 +0100
commit561a01cc2a8ca0b83b37975a048d34dcfd0d41e1 (patch)
treeeed4bfe89f439e4c0573b76e0c670ff0267c1cdc /src/object_properties.cpp
parentbd6b90359c654f4c75964755e476a8bfd90114ba (diff)
downloadminetest-561a01cc2a8ca0b83b37975a048d34dcfd0d41e1.tar.gz
minetest-561a01cc2a8ca0b83b37975a048d34dcfd0d41e1.tar.bz2
minetest-561a01cc2a8ca0b83b37975a048d34dcfd0d41e1.zip
Zoom: Move enabling zoom to a new player object property
Default enabled for no change in default behaviour. Remove 'zoom' privilege.
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index cf23e3433..172eec925 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -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);
}