1
0
mirror of https://codeberg.org/tenplus1/ambience.git synced 2025-07-12 13:30:28 +02:00

fix timed stops and tweaked water sound gain

This commit is contained in:
tenplus1
2020-06-14 10:12:22 +01:00
parent 45b0e6b28e
commit 2b143286b7
2 changed files with 27 additions and 17 deletions

View File

@ -44,7 +44,6 @@ ambience.add_set("splash", {
})
-- check for env_sounds mod, if not found enable water flowing sounds
if not minetest.get_modpath("env_sounds") then
-- Water sound plays when near flowing water, will get louder if more than 50
@ -58,12 +57,10 @@ ambience.add_set("flowing_water", {
local c = (def.totals["default:water_flowing"] or 0)
if c > 50 then
return "flowing_water", 0.5
elseif c > 20 then
return "flowing_water"
if c > 5 then
return "flowing_water", math.min(0.04 + c * 0.004, 0.6)
end
end,
nodes = {"default:water_flowing"}
})
@ -79,12 +76,10 @@ ambience.add_set("river", {
local c = (def.totals["default:river_water_flowing"] or 0)
if c > 20 then
return "river", 0.4
elseif c > 5 then
return "river"
if c > 5 then
return "river", math.min(0.04 + c * 0.004, 0.5)
end
end,
nodes = {"default:river_water_flowing"}
})