mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 11:17:30 +01:00
Update sky blackening when player's in void
This commit is contained in:
parent
860155e5c1
commit
41f45d8c38
@ -152,14 +152,14 @@ minetest.register_globalstep(function(dtime)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Apply black sky in the Void and deal Void damage
|
-- Apply black sky in the Void and deal Void damage
|
||||||
if pos.y < mcl_vars.mg_bedrock_overworld_max then
|
local void, void_deadly = mcl_util.is_in_void(pos)
|
||||||
|
if void then
|
||||||
-- Player reached the void, set black sky box
|
-- Player reached the void, set black sky box
|
||||||
player:set_sky("#000000", "plain", nil, false)
|
player:set_sky("#000000", "plain", nil, false)
|
||||||
-- FIXME: Sky handling in MCL2 is held together with lots of duct tape.
|
-- FIXME: Sky handling in MCL2 is held together with lots of duct tape.
|
||||||
-- This only works beause weather_pack currently does not touch the sky for players below the height used for this check.
|
-- This only works beause weather_pack currently does not touch the sky for players below the height used for this check.
|
||||||
-- There should be a real skybox API.
|
-- There should be a real skybox API.
|
||||||
end
|
end
|
||||||
local void, void_deadly = mcl_util.is_in_void(pos)
|
|
||||||
if void_deadly then
|
if void_deadly then
|
||||||
-- Player is deep into the void, deal void damage
|
-- Player is deep into the void, deal void damage
|
||||||
if player:get_hp() > 0 then
|
if player:get_hp() > 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user