1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-07-05 16:10:19 +02:00

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

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,8 +110,10 @@ local function update_clouds()
), 2),
speed = {x = n_speedx * 4, z = n_speedz * 4},
})
if weather.shadows_enabled then
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
end
end
end