diff options
author | Danila Shutov <dcbrwn2@gmail.com> | 2020-06-16 22:48:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 20:48:31 +0100 |
commit | 3a6dfda358112e2fb5d6f887a1a1e936eacddadd (patch) | |
tree | 340e1e0442ef8ba346b522580b2b6bee66246b30 /src/script/common | |
parent | 0a1181f7637adab6fe1ba5d3c09038912a06b37f (diff) | |
download | minetest-3a6dfda358112e2fb5d6f887a1a1e936eacddadd.tar.gz minetest-3a6dfda358112e2fb5d6f887a1a1e936eacddadd.tar.bz2 minetest-3a6dfda358112e2fb5d6f887a1a1e936eacddadd.zip |
Make shading of CAOs optional (#10033)
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 2157d087d..3dfd7ce61 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -327,6 +327,7 @@ void read_object_properties(lua_State *L, int index, getfloatfield(L, -1, "zoom_fov", prop->zoom_fov); getboolfield(L, -1, "use_texture_alpha", prop->use_texture_alpha); + getboolfield(L, -1, "shaded", prop->shaded); getstringfield(L, -1, "damage_texture_modifier", prop->damage_texture_modifier); } @@ -411,6 +412,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop) lua_setfield(L, -2, "zoom_fov"); lua_pushboolean(L, prop->use_texture_alpha); lua_setfield(L, -2, "use_texture_alpha"); + lua_pushboolean(L, prop->shaded); + lua_setfield(L, -2, "shaded"); lua_pushlstring(L, prop->damage_texture_modifier.c_str(), prop->damage_texture_modifier.size()); lua_setfield(L, -2, "damage_texture_modifier"); } |