aboutsummaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2015-09-28 20:49:38 +0200
committerBlockMen <nmuelll@web.de>2015-10-25 12:06:08 +0100
commit50ba7e114d0937061f988c9452904dd2456399b5 (patch)
treedab9054e22208e42841c29d3b38f3e1fe8134cda /src/script/common
parent6907c3e40a16d491fd0f7b224ba30a58e0777a24 (diff)
downloadminetest-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/script/common')
-rw-r--r--src/script/common/c_content.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 00ec85b2f..787541ad0 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -197,6 +197,7 @@ void read_object_properties(lua_State *L, int index,
prop->automatic_face_movement_dir_offset = 0.0;
}
lua_pop(L, 1);
+ getboolfield(L, -1, "backface_culling", prop->backface_culling);
}
/******************************************************************************/
@@ -255,6 +256,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop)
else
lua_pushboolean(L, false);
lua_setfield(L, -2, "automatic_face_movement_dir");
+ lua_pushboolean(L, prop->backface_culling);
+ lua_setfield(L, -2, "backface_culling");
}
/******************************************************************************/
@@ -1231,4 +1234,3 @@ void read_json_value(lua_State *L, Json::Value &root, int index, u8 recursion)
}
lua_pop(L, 1); // Pop value
}
-