mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-20 14:23:16 -04:00
Control shadows with a behavior flag
This commit is contained in:
parent
b6c5bb7065
commit
5494fa87c9
1 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,10 @@ if mg_name == "v6" or mg_name == "singlenode" or
|
|||
return
|
||||
end
|
||||
|
||||
-- Public behavior flags
|
||||
weather = {
|
||||
shadows_enabled = true,
|
||||
}
|
||||
|
||||
-- Parameters
|
||||
|
||||
|
@ -106,9 +110,11 @@ 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
|
||||
|
||||
|
||||
local function cyclic_update()
|
||||
|
|
Loading…
Add table
Reference in a new issue