diff options
author | BlockMen <nmuelll@web.de> | 2015-09-28 20:49:38 +0200 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-10-25 12:06:08 +0100 |
commit | 50ba7e114d0937061f988c9452904dd2456399b5 (patch) | |
tree | dab9054e22208e42841c29d3b38f3e1fe8134cda /src/object_properties.cpp | |
parent | 6907c3e40a16d491fd0f7b224ba30a58e0777a24 (diff) | |
download | minetest-50ba7e114d0937061f988c9452904dd2456399b5.tar.gz minetest-50ba7e114d0937061f988c9452904dd2456399b5.tar.bz2 minetest-50ba7e114d0937061f988c9452904dd2456399b5.zip |
Add option to disable backface culling for models
- Disabled by default (except players)
- Fixes #2984
Diffstat (limited to 'src/object_properties.cpp')
-rw-r--r-- | src/object_properties.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/object_properties.cpp b/src/object_properties.cpp index f560f5934..dc1eddf4e 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -42,7 +42,8 @@ ObjectProperties::ObjectProperties(): automatic_rotate(0), stepheight(0), automatic_face_movement_dir(false), - automatic_face_movement_dir_offset(0.0) + automatic_face_movement_dir_offset(0.0), + backface_culling(true) { textures.push_back("unknown_object.png"); colors.push_back(video::SColor(255,255,255,255)); @@ -74,6 +75,7 @@ std::string ObjectProperties::dump() os<<", is_visible="<<is_visible; os<<", makes_footstep_sound="<<makes_footstep_sound; os<<", automatic_rotate="<<automatic_rotate; + os<<", backface_culling="<<backface_culling; return os.str(); } @@ -106,6 +108,7 @@ void ObjectProperties::serialize(std::ostream &os) const writeF1000(os,stepheight); writeU8(os, automatic_face_movement_dir); writeF1000(os, automatic_face_movement_dir_offset); + writeU8(os, backface_culling); // Add stuff only at the bottom. // Never remove anything, because we don't want new versions of this } @@ -142,6 +145,7 @@ void ObjectProperties::deSerialize(std::istream &is) stepheight = readF1000(is); automatic_face_movement_dir = readU8(is); automatic_face_movement_dir_offset = readF1000(is); + backface_culling = readU8(is); }catch(SerializationError &e){} } else @@ -149,4 +153,3 @@ void ObjectProperties::deSerialize(std::istream &is) throw SerializationError("unsupported ObjectProperties version"); } } - |