Control shadows with a behavior flag

This commit is contained in:
Dmitry Kostenko 2022-03-18 21:50:37 +01:00
parent b6c5bb7065
commit 5494fa87c9
1 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,10 @@ if mg_name == "v6" or mg_name == "singlenode" or
return
end
-- Public behavior flags
weather = {
shadows_enabled = true,
}
-- Parameters
@ -106,7 +110,9 @@ local function update_clouds()
), 2),
speed = {x = n_speedx * 4, z = n_speedz * 4},
})
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
if weather.shadows_enabled then
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
end
end
end