mirror of
https://github.com/minetest/minetest_game.git
synced 2025-07-06 08:10:22 +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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Public behavior flags
|
||||||
|
weather = {
|
||||||
|
shadows_enabled = true,
|
||||||
|
}
|
||||||
|
|
||||||
-- Parameters
|
-- Parameters
|
||||||
|
|
||||||
@ -106,9 +110,11 @@ local function update_clouds()
|
|||||||
), 2),
|
), 2),
|
||||||
speed = {x = n_speedx * 4, z = n_speedz * 4},
|
speed = {x = n_speedx * 4, z = n_speedz * 4},
|
||||||
})
|
})
|
||||||
|
if weather.shadows_enabled then
|
||||||
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
|
player:set_lighting({shadows = { intensity = 0.5 - density / 2.0} })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function cyclic_update()
|
local function cyclic_update()
|
||||||
|
Reference in New Issue
Block a user