summaryrefslogtreecommitdiff
path: root/src/network/clientpackethandler.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2022-01-22 13:37:26 +0100
committerHugues Ross <hugues.ross@gmail.com>2022-01-22 11:18:34 -0500
commitf8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce (patch)
tree18c6fd04a6e999a82fdc60c94097df6cb8df6d37 /src/network/clientpackethandler.cpp
parent37d80784ddfc0ff07baee214570c80dc5dd92ca7 (diff)
downloadminetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.tar.gz
minetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.tar.bz2
minetest-f8cef52ea07de6a6ccaa6f9a853a8e5ccaaff4ce.zip
Fix consistency of sky sun/moon texture behaviour
Also cleans up related code somewhat.
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r--src/network/clientpackethandler.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp
index f7c586b80..47f259b92 100644
--- a/src/network/clientpackethandler.cpp
+++ b/src/network/clientpackethandler.cpp
@@ -1242,19 +1242,17 @@ void Client::handleCommand_HudSetSky(NetworkPacket* pkt)
} catch (...) {}
// Use default skybox settings:
- SkyboxDefaults sky_defaults;
- SunParams sun = sky_defaults.getSunDefaults();
- MoonParams moon = sky_defaults.getMoonDefaults();
- StarParams stars = sky_defaults.getStarDefaults();
+ SunParams sun = SkyboxDefaults::getSunDefaults();
+ MoonParams moon = SkyboxDefaults::getMoonDefaults();
+ StarParams stars = SkyboxDefaults::getStarDefaults();
// Fix for "regular" skies, as color isn't kept:
if (skybox.type == "regular") {
- skybox.sky_color = sky_defaults.getSkyColorDefaults();
+ skybox.sky_color = SkyboxDefaults::getSkyColorDefaults();
skybox.fog_tint_type = "default";
skybox.fog_moon_tint = video::SColor(255, 255, 255, 255);
skybox.fog_sun_tint = video::SColor(255, 255, 255, 255);
- }
- else {
+ } else {
sun.visible = false;
sun.sunrise_visible = false;
moon.visible = false;