diff --git a/snowdrift/init.lua b/snowdrift/init.lua index ee3a626..f848166 100644 --- a/snowdrift/init.lua +++ b/snowdrift/init.lua @@ -279,11 +279,15 @@ minetest.register_globalstep(function(dtime) end end - elseif handles[player_name] then - -- Stop sound when player goes above y limit - minetest.sound_stop(handles[player_name]) - handles[player_name] = nil - volumes[player_name] = nil + else + -- Reset sky to normal + player:set_sky({}, "regular", {}, true) + if handles[player_name] then + -- Stop sound when player goes above y limit + minetest.sound_stop(handles[player_name]) + handles[player_name] = nil + volumes[player_name] = nil + end end end end)