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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user