diff options
author | x2048 <codeforsmile@gmail.com> | 2023-03-24 12:34:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 12:34:21 +0100 |
commit | f3b198e49008ea3aba568974c8f423fdc801d4a2 (patch) | |
tree | 8eca17900d17554aa8d43a62a9448a50fd3e3c19 /src/script/lua_api/l_object.cpp | |
parent | 9af587c54ebacd6708cc57902278c30556b6aaa0 (diff) | |
download | minetest-f3b198e49008ea3aba568974c8f423fdc801d4a2.tar.xz |
Return shadow_sky_body_orbit_tilt setting
Used as a default value when the game does not change the value via API (e.g. legacy server)
Diffstat (limited to 'src/script/lua_api/l_object.cpp')
-rw-r--r-- | src/script/lua_api/l_object.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp index c75478590..11819c0e7 100644 --- a/src/script/lua_api/l_object.cpp +++ b/src/script/lua_api/l_object.cpp @@ -1919,8 +1919,10 @@ int ObjectRef::l_get_sky(lua_State *L) lua_pushlstring(L, skybox_params.type.c_str(), skybox_params.type.size()); lua_setfield(L, -2, "type"); - lua_pushnumber(L, skybox_params.body_orbit_tilt); - lua_setfield(L, -2, "body_orbit_tilt"); + if (skybox_params.body_orbit_tilt != SkyboxParams::INVALID_SKYBOX_TILT) { + lua_pushnumber(L, skybox_params.body_orbit_tilt); + lua_setfield(L, -2, "body_orbit_tilt"); + } lua_newtable(L); s16 i = 1; |