aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2023-03-24 12:34:21 +0100
committerGitHub <noreply@github.com>2023-03-24 12:34:21 +0100
commitf3b198e49008ea3aba568974c8f423fdc801d4a2 (patch)
tree8eca17900d17554aa8d43a62a9448a50fd3e3c19 /src/client
parent9af587c54ebacd6708cc57902278c30556b6aaa0 (diff)
downloadminetest-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/client')
-rw-r--r--src/client/sky.cpp1
-rw-r--r--src/client/sky.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/client/sky.cpp b/src/client/sky.cpp
index eb7db36d4..0cdec0ac9 100644
--- a/src/client/sky.cpp
+++ b/src/client/sky.cpp
@@ -97,6 +97,7 @@ Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShade
}
m_directional_colored_fog = g_settings->getBool("directional_colored_fog");
+ m_sky_params.body_orbit_tilt = g_settings->getFloat("shadow_sky_body_orbit_tilt", -60., 60.);
setStarCount(1000);
}
diff --git a/src/client/sky.h b/src/client/sky.h
index 602876797..9102db4d4 100644
--- a/src/client/sky.h
+++ b/src/client/sky.h
@@ -98,7 +98,8 @@ public:
}
void setBodyOrbitTilt(float body_orbit_tilt)
{
- m_sky_params.body_orbit_tilt = body_orbit_tilt;
+ if (body_orbit_tilt != SkyboxParams::INVALID_SKYBOX_TILT)
+ m_sky_params.body_orbit_tilt = rangelim(body_orbit_tilt, -90.f, 90.f);
}
void overrideColors(video::SColor bgcolor, video::SColor skycolor)
{