0
0
Fork 0

Fix weather sky color issues

But also disable void blackness
This commit is contained in:
Wuzzy 2017-02-21 04:20:43 +01:00
parent 6d9eeb24ec
commit edde01d582
2 changed files with 8 additions and 7 deletions

View File

@ -25,19 +25,16 @@ local rng = PcgRandom(32321123312123)
local ps = {}
local ttl = 1
local revertsky = function()
local revertsky = function(dtime)
if ttl == 0 then
return
end
ttl = ttl - 1
ttl = ttl - dtime
if ttl > 0 then
return
end
for key, entry in pairs(ps) do
local sky = entry.sky
entry.p:set_sky(sky.bgcolor, sky.type, sky.textures)
end
skycolor.remove_layer("lightning")
ps = {}
end
@ -139,7 +136,8 @@ lightning.strike = function(pos)
local name = player:get_player_name()
if ps[name] == nil then
ps[name] = {p = player, sky = sky}
player:set_sky(0xffffff, "plain", {})
skycolor.add_layer("lightning", {{r=255,g=255,b=255}})
skycolor.active = true
end
end

View File

@ -122,12 +122,15 @@ minetest.register_globalstep(function(dtime)
end
-- Apply black sky in the Void and deal Void damage
--[[ DISABLED because of conflicts with weater_pack.
TODO: The sky color handling needs a major rework.
if pos.y < mcl_vars.bedrock_overworld_max then
-- Player reached the void, set black sky box
player:set_sky("#000000", "plain")
else
player:set_sky(nil, "regular")
end
]]
if pos.y < mcl_vars.bedrock_overworld_min - 65 then
-- Player is deep into the void, deal void damage
if player:get_hp() > 0 then