diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2022-07-09 22:32:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 22:32:08 +0200 |
commit | 051181fa6ee00d8379e8a7dc7442b58342d4352b (patch) | |
tree | 58ad84f05310024b311c533684defdbeb5ee3e84 /src/client/clouds.cpp | |
parent | 7c261118e06c630ea9ad00f20d7005b8edc108dd (diff) | |
download | minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.gz minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.bz2 minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.zip |
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
Diffstat (limited to 'src/client/clouds.cpp')
-rw-r--r-- | src/client/clouds.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/clouds.cpp b/src/client/clouds.cpp index 383a1d799..c84c03034 100644 --- a/src/client/clouds.cpp +++ b/src/client/clouds.cpp @@ -366,7 +366,8 @@ void Clouds::update(const v3f &camera_p, const video::SColorf &color_diffuse) void Clouds::readSettings() { - m_cloud_radius_i = g_settings->getU16("cloud_radius"); + // Upper limit was chosen due to posible render bugs + m_cloud_radius_i = rangelim(g_settings->getU16("cloud_radius"), 1, 62); m_enable_3d = g_settings->getBool("enable_3d_clouds"); } |