summaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorparamat <paramat@users.noreply.github.com>2017-11-03 19:10:53 +0000
committerparamat <mat.gregory@virginmedia.com>2017-11-06 12:54:00 +0000
commit4c40e0775ca564296a56f72ff3adce50ba925b0c (patch)
tree204f8f52953502ef56fff2f25c4d8f976524a6c8 /src/object_properties.cpp
parenta07d2594e3b9372cabbeedc98bb98903137f56b3 (diff)
downloadminetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.tar.gz
minetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.tar.bz2
minetest-4c40e0775ca564296a56f72ff3adce50ba925b0c.zip
Player eye height: Make this a settable player object property
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index ae0305019..ffb1ecb43 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -67,6 +67,7 @@ std::string ObjectProperties::dump()
os << ", pointable=" << pointable;
os << ", can_zoom=" << can_zoom;
os << ", static_save=" << static_save;
+ os << ", eye_height=" << eye_height;
return os.str();
}
@@ -99,7 +100,7 @@ void ObjectProperties::serialize(std::ostream &os) const
writeARGB8(os, color);
}
writeU8(os, collideWithObjects);
- writeF1000(os,stepheight);
+ writeF1000(os, stepheight);
writeU8(os, automatic_face_movement_dir);
writeF1000(os, automatic_face_movement_dir_offset);
writeU8(os, backface_culling);
@@ -111,6 +112,7 @@ void ObjectProperties::serialize(std::ostream &os) const
writeU8(os, can_zoom);
writeS8(os, glow);
writeU16(os, breath_max);
+ writeF1000(os, eye_height);
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
@@ -162,5 +164,6 @@ void ObjectProperties::deSerialize(std::istream &is)
try {
glow = readS8(is);
breath_max = readU16(is);
+ eye_height = readF1000(is);
} catch (SerializationError &e) {}
}