]> git.lizzy.rs Git - minetest.git/commitdiff
Fix spurious shadow enablement in mainmenu
authorsfan5 <sfan5@live.de>
Wed, 30 Jun 2021 15:10:28 +0000 (17:10 +0200)
committersfan5 <sfan5@live.de>
Wed, 30 Jun 2021 15:10:28 +0000 (17:10 +0200)
fixes #11394

builtin/mainmenu/tab_settings.lua

index 8bc5bf8b6c894fc94507a74ecfd39995361bdc74..f06e3587224746c39afc27a7976035047ea73a9d 100644 (file)
@@ -369,7 +369,6 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
        if fields["dd_shadows"] == labels.shadow_levels[1] then
                core.settings:set("enable_dynamic_shadows", "false")
        else
-               core.settings:set("enable_dynamic_shadows", "true")
                local shadow_presets = {
                        [2] = { 80,  512,  "true", 0, "false" },
                        [3] = { 120, 1024, "true", 1, "false" },
@@ -379,6 +378,7 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
                }
                local s = shadow_presets[table.indexof(labels.shadow_levels, fields["dd_shadows"])]
                if s then
+                       core.settings:set("enable_dynamic_shadows", "true")
                        core.settings:set("shadow_map_max_distance", s[1])
                        core.settings:set("shadow_map_texture_size", s[2])
                        core.settings:set("shadow_map_texture_32bit", s[3])