From f3b198e49008ea3aba568974c8f423fdc801d4a2 Mon Sep 17 00:00:00 2001 From: x2048 Date: Fri, 24 Mar 2023 12:34:21 +0100 Subject: 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) --- src/script/lua_api/l_object.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/script/lua_api/l_object.cpp') 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; -- cgit v1.2.3