X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=f4e4953babe6380f9037ca0f632341ccdff3b847;hb=454483f26610959526d97c1d318e0d699d78747d;hp=3cec51672a99713e3b31513910b983930414e55e;hpb=9eee3c3f465c071bb9908749cf48be3c131a1bdf;p=oweals%2Fminetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 3cec51672..f4e4953ba 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -21,11 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes_bloated.h" #include "exceptions.h" #include "util/serialize.h" +#include "util/basic_macros.h" #include -#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" -#define PP2(x) "("<<(x).X<<","<<(x).Y<<")" - ObjectProperties::ObjectProperties(): hp_max(1), physical(false), @@ -45,7 +43,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 +115,9 @@ 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); + os << serializeString(infotext); + // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this } @@ -155,6 +157,8 @@ 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); + infotext = deSerializeString(is); }catch(SerializationError &e){} } else