X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=f560f59343a6d6507e6993d8b2aaacb43c84b2af;hb=58e6d25e033c76dc91aaac18fdeda92ac23fe0e1;hp=c2debf328296eabbc34b2a18bfd4346101f65c4b;hpb=8cae65978611476d0da215acf61819a905c68267;p=oweals%2Fminetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index c2debf328..f560f5934 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -19,9 +19,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "object_properties.h" #include "irrlichttypes_bloated.h" +#include "exceptions.h" #include "util/serialize.h" #include -#include #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" #define PP2(x) "("<<(x).X<<","<<(x).Y<<")" @@ -39,7 +39,10 @@ ObjectProperties::ObjectProperties(): initial_sprite_basepos(0,0), is_visible(true), makes_footstep_sound(false), - automatic_rotate(0) + automatic_rotate(0), + stepheight(0), + automatic_face_movement_dir(false), + automatic_face_movement_dir_offset(0.0) { textures.push_back("unknown_object.png"); colors.push_back(video::SColor(255,255,255,255)); @@ -100,6 +103,9 @@ void ObjectProperties::serialize(std::ostream &os) const writeARGB8(os, colors[i]); } writeU8(os, collideWithObjects); + writeF1000(os,stepheight); + writeU8(os, automatic_face_movement_dir); + writeF1000(os, automatic_face_movement_dir_offset); // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this } @@ -133,6 +139,9 @@ void ObjectProperties::deSerialize(std::istream &is) colors.push_back(readARGB8(is)); } collideWithObjects = readU8(is); + stepheight = readF1000(is); + automatic_face_movement_dir = readU8(is); + automatic_face_movement_dir_offset = readF1000(is); }catch(SerializationError &e){} } else