mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-26 09:59:33 +01:00
Fade out rain and fire sounds
This commit is contained in:
parent
aced401c6c
commit
ed336829b4
2 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ mcl_weather.rain.update_sound = function(player)
|
|||
|
||||
if player_meta.sound_handler ~= nil then
|
||||
if mcl_weather.rain.last_rp_count == 0 then
|
||||
minetest.sound_stop(player_meta.sound_handler)
|
||||
minetest.sound_fade(player_meta.sound_handler, -0.5, 0.0)
|
||||
player_meta.sound_handler = nil
|
||||
end
|
||||
elseif mcl_weather.rain.last_rp_count > 0 then
|
||||
|
@ -142,7 +142,7 @@ end
|
|||
mcl_weather.rain.remove_sound = function(player)
|
||||
local player_meta = mcl_weather.players[player:get_player_name()]
|
||||
if player_meta ~= nil and player_meta.sound_handler ~= nil then
|
||||
minetest.sound_stop(player_meta.sound_handler)
|
||||
minetest.sound_fade(player_meta.sound_handler, -0.5, 0.0)
|
||||
player_meta.sound_handler = nil
|
||||
player_meta.sound_updated = nil
|
||||
end
|
||||
|
|
|
@ -217,7 +217,7 @@ if flame_sound then
|
|||
(num["mcl_fire:eternal_fire"] or 0)
|
||||
-- Stop previous sound
|
||||
if handles[player_name] then
|
||||
minetest.sound_stop(handles[player_name])
|
||||
minetest.sound_fade(handles[player_name], -0.4, 0.0)
|
||||
handles[player_name] = nil
|
||||
end
|
||||
-- If flames
|
||||
|
|
Loading…
Reference in a new issue