summaryrefslogtreecommitdiff
path: root/src/object_properties.cpp
diff options
context:
space:
mode:
authorSapier <sapier@does.not.have.an.email>2015-12-15 00:03:18 +0100
committerSapier <sapier AT gmx dot net>2015-12-19 17:00:36 +0100
commit70ea5d552e283bd5bce3278cbf3819bd87ba2602 (patch)
treeee1a61eb38e1d29696dd71ed240625933176d939 /src/object_properties.cpp
parent06632205d8765b5417c36df798617721bab0d02f (diff)
downloadminetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.tar.gz
minetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.tar.bz2
minetest-70ea5d552e283bd5bce3278cbf3819bd87ba2602.zip
Add support for limiting rotation of automatic face movement dir entitys
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r--src/object_properties.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp
index 3cec51672..abd1bbd09 100644
--- a/src/object_properties.cpp
+++ b/src/object_properties.cpp
@@ -45,7 +45,8 @@ ObjectProperties::ObjectProperties():
automatic_face_movement_dir_offset(0.0),
backface_culling(true),
nametag(""),
- nametag_color(255, 255, 255, 255)
+ nametag_color(255, 255, 255, 255),
+ automatic_face_movement_max_rotation_per_sec(-1)
{
textures.push_back("unknown_object.png");
colors.push_back(video::SColor(255,255,255,255));
@@ -116,6 +117,8 @@ void ObjectProperties::serialize(std::ostream &os) const
writeU8(os, backface_culling);
os << serializeString(nametag);
writeARGB8(os, nametag_color);
+ writeF1000(os, automatic_face_movement_max_rotation_per_sec);
+
// Add stuff only at the bottom.
// Never remove anything, because we don't want new versions of this
}
@@ -155,6 +158,7 @@ void ObjectProperties::deSerialize(std::istream &is)
backface_culling = readU8(is);
nametag = deSerializeString(is);
nametag_color = readARGB8(is);
+ automatic_face_movement_max_rotation_per_sec = readF1000(is);
}catch(SerializationError &e){}
}
else