From ed336829b4ad355e8b051757411d222e7a1c1276 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 5 Sep 2019 00:07:32 +0200 Subject: [PATCH] Fade out rain and fire sounds --- mods/ENVIRONMENT/mcl_weather/rain.lua | 4 ++-- mods/ITEMS/mcl_fire/init.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/rain.lua b/mods/ENVIRONMENT/mcl_weather/rain.lua index 8a4cff0870..76e3860840 100644 --- a/mods/ENVIRONMENT/mcl_weather/rain.lua +++ b/mods/ENVIRONMENT/mcl_weather/rain.lua @@ -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 diff --git a/mods/ITEMS/mcl_fire/init.lua b/mods/ITEMS/mcl_fire/init.lua index cefeb046ce..ea36d1ce14 100644 --- a/mods/ITEMS/mcl_fire/init.lua +++ b/mods/ITEMS/mcl_fire/init.lua @@ -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