diff options
author | sapier <Sapier at GMX dot net> | 2013-07-22 18:54:30 +0200 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-07-30 19:48:02 +0200 |
commit | 251e3e01c7350d94ea8dec0857e834d1ed84ac3f (patch) | |
tree | 4278247af930c66a1012e71d2ed5d65fea137347 /src/object_properties.cpp | |
parent | ff7c380d0eabf96a8677dfa3a94f0d18191572cf (diff) | |
download | minetest-251e3e01c7350d94ea8dec0857e834d1ed84ac3f.tar.gz minetest-251e3e01c7350d94ea8dec0857e834d1ed84ac3f.tar.bz2 minetest-251e3e01c7350d94ea8dec0857e834d1ed84ac3f.zip |
Add support for setting stepheight for entities
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r-- | src/object_properties.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp index c2debf328..1602f03f2 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -39,7 +39,8 @@ ObjectProperties::ObjectProperties(): initial_sprite_basepos(0,0), is_visible(true), makes_footstep_sound(false), - automatic_rotate(0) + automatic_rotate(0), + stepheight(0) { textures.push_back("unknown_object.png"); colors.push_back(video::SColor(255,255,255,255)); @@ -100,6 +101,7 @@ void ObjectProperties::serialize(std::ostream &os) const writeARGB8(os, colors[i]); } writeU8(os, collideWithObjects); + writeF1000(os,stepheight); // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this } @@ -133,6 +135,7 @@ void ObjectProperties::deSerialize(std::istream &is) colors.push_back(readARGB8(is)); } collideWithObjects = readU8(is); + stepheight = readF1000(is); }catch(SerializationError &e){} } else |