summaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorstujones11 <stujones111@gmail.com>2017-08-24 09:01:16 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-08-24 10:01:16 +0200
commitac4884c3d677ef51bcce47f95ccd49d874022692 (patch)
treed7474c9c8914a6147a157245182fa8f201b51646 /src/object_properties.cpp
parent01c319d7784c3db614a53745e5af62c43cf45c90 (diff)
downloadminetest-ac4884c3d677ef51bcce47f95ccd49d874022692.tar.gz
minetest-ac4884c3d677ef51bcce47f95ccd49d874022692.tar.bz2
minetest-ac4884c3d677ef51bcce47f95ccd49d874022692.zip
Make entity selection and collision boxes independently settable (#6218)
* Make entity selection and collision boxes independently settable
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index 5534db283..c9e134710 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -61,6 +61,8 @@ std::string ObjectProperties::dump()
os << ", nametag=" << nametag;
os << ", nametag_color=" << "\"" << nametag_color.getAlpha() << "," << nametag_color.getRed()
<< "," << nametag_color.getGreen() << "," << nametag_color.getBlue() << "\" ";
+ os << ", selectionbox=" << PP(selectionbox.MinEdge) << "," << PP(selectionbox.MaxEdge);
+ os << ", pointable=" << pointable;
return os.str();
}
@@ -99,6 +101,9 @@ void ObjectProperties::serialize(std::ostream &os) const
writeF1000(os, automatic_face_movement_max_rotation_per_sec);
os << serializeString(infotext);
os << serializeString(wield_item);
+ writeV3F1000(os, selectionbox.MinEdge);
+ writeV3F1000(os, selectionbox.MaxEdge);
+ writeU8(os, pointable);
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
@@ -142,6 +147,9 @@ void ObjectProperties::deSerialize(std::istream &is)
automatic_face_movement_max_rotation_per_sec = readF1000(is);
infotext = deSerializeString(is);
wield_item = deSerializeString(is);
+ selectionbox.MinEdge = readV3F1000(is);
+ selectionbox.MaxEdge = readV3F1000(is);
+ pointable = readU8(is);
}catch(SerializationError &e){}
}
else