forked from Mineclonia/Mineclonia
Remove clouds when in void
This commit is contained in:
parent
ea841eecfb
commit
8773c4b52f
|
@ -92,7 +92,7 @@ end
|
||||||
rain.remove_player = function(player)
|
rain.remove_player = function(player)
|
||||||
local player_meta = weather.players[player:get_player_name()]
|
local player_meta = weather.players[player:get_player_name()]
|
||||||
if player_meta ~= nil and player_meta.origin_sky ~= nil then
|
if player_meta ~= nil and player_meta.origin_sky ~= nil then
|
||||||
player:set_sky(player_meta.origin_sky[1], player_meta.origin_sky[2], player_meta.origin_sky[3])
|
player:set_sky(player_meta.origin_sky[1], player_meta.origin_sky[2], player_meta.origin_sky[3], true)
|
||||||
player:set_clouds({color="#FFF0F0E5"})
|
player:set_clouds({color="#FFF0F0E5"})
|
||||||
weather.players[player:get_player_name()] = nil
|
weather.players[player:get_player_name()] = nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -75,7 +75,7 @@ skycolor = {
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
||||||
player:set_sky(color, "plain", nil)
|
player:set_sky(color, "plain", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -113,7 +113,7 @@ skycolor = {
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
||||||
player:set_sky(color, "plain", nil)
|
player:set_sky(color, "plain", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -126,7 +126,7 @@ skycolor = {
|
||||||
for _, player in ipairs(players) do
|
for _, player in ipairs(players) do
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
if pos.y >= mcl_vars.mg_bedrock_overworld_max then
|
||||||
player:set_sky(nil, "regular", nil)
|
player:set_sky(nil, "regular", nil, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -178,7 +178,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
-- 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
|
if pos.y < mcl_vars.mg_bedrock_overworld_max then
|
||||||
-- Player reached the void, set black sky box
|
-- Player reached the void, set black sky box
|
||||||
player:set_sky("#000000", "plain")
|
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.
|
||||||
|
|
Loading…
Reference in New Issue