aboutsummaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-07-18 13:53:15 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-07-18 13:53:15 +0200
commitffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f (patch)
treecc7d9f74a43215c5d8e3965a2bfc2aea5867a7a0 /src/object_properties.cpp
parent45aa2516b2fc675df7049bc9ed713600c95b6423 (diff)
parent82731d0d3d8bfe9e56f89466991f13c037f3a61e (diff)
downloaddragonfireclient-ffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f.tar.xz
Update to minetest 5.4.0-dev
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index 4cf180b18..8d51bcbfa 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -68,6 +68,8 @@ std::string ObjectProperties::dump()
os << ", eye_height=" << eye_height;
os << ", zoom_fov=" << zoom_fov;
os << ", use_texture_alpha=" << use_texture_alpha;
+ os << ", damage_texture_modifier=" << damage_texture_modifier;
+ os << ", shaded=" << shaded;
return os.str();
}
@@ -114,6 +116,8 @@ void ObjectProperties::serialize(std::ostream &os) const
writeF32(os, eye_height);
writeF32(os, zoom_fov);
writeU8(os, use_texture_alpha);
+ os << serializeString(damage_texture_modifier);
+ writeU8(os, shaded);
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
@@ -166,4 +170,11 @@ void ObjectProperties::deSerialize(std::istream &is)
eye_height = readF32(is);
zoom_fov = readF32(is);
use_texture_alpha = readU8(is);
+ try {
+ damage_texture_modifier = deSerializeString(is);
+ u8 tmp = readU8(is);
+ if (is.eof())
+ throw SerializationError("");
+ shaded = tmp;
+ } catch (SerializationError &e) {}
}