1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make shading of CAOs optional (#10033)

This commit is contained in:
Danila Shutov 2020-06-16 22:48:31 +03:00 committed by GitHub
parent 0a1181f763
commit 3a6dfda358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 47 additions and 7 deletions

View file

@ -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");
}