snowdrift: reset sky to normal when player goes up

This commit is contained in:
techniX 2020-01-17 19:28:40 +02:00
parent 9643e20e90
commit 3dc21dda1a

View File

@ -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)