mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 05:44:26 -04:00
Add footsteps for water - swimming sounds.
This is a redo of #436. I've taken a single, longer audio sample and extracted 3 samples of 2.0 length, and gave them all a 0.5 sec fade-in and fade-out. I added a 4th sample that's essentially a nearly-quiet version of one of the prior sounds. This combined with the rate of footstep sounds results in a randomly changing underwater sound that blends in and out somewhat nicely. Code entirely by @MirceaKitsune.
This commit is contained in:
parent
f80fafbcfb
commit
90200a66e9
7 changed files with 24 additions and 0 deletions
|
@ -221,3 +221,9 @@ Mito551 (sounds) (CC BY-SA):
|
|||
default_dirt_footstep.1.ogg
|
||||
default_dirt_footstep.2.ogg
|
||||
default_glass_footstep.ogg
|
||||
|
||||
Water footsteps - CC-BY-3.0 - by akemov - http://www.freesound.org/people/akemov/sounds/255597/
|
||||
default_water_footstep.1.ogg
|
||||
default_water_footstep.2.ogg
|
||||
default_water_footstep.3.ogg
|
||||
default_water_footstep.4.ogg
|
||||
|
|
|
@ -83,6 +83,20 @@ function default.node_sound_glass_defaults(table)
|
|||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_water_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name="default_water_footstep", gain=0.25}
|
||||
table.dug = table.dug or
|
||||
{name="default_water_footstep", gain=0.4}
|
||||
table.dig = table.dig or
|
||||
{name="default_water_footstep", gain=0.4}
|
||||
table.place = table.place or
|
||||
{name="default_water_footstep", gain=0.4}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Lavacooling
|
||||
|
|
|
@ -1092,6 +1092,7 @@ minetest.register_node("default:water_source", {
|
|||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:water_flowing", {
|
||||
|
@ -1137,6 +1138,7 @@ minetest.register_node("default:water_flowing", {
|
|||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -1183,6 +1185,7 @@ minetest.register_node("default:river_water_source", {
|
|||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:river_water_flowing", {
|
||||
|
@ -1230,6 +1233,7 @@ minetest.register_node("default:river_water_flowing", {
|
|||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
|
BIN
mods/default/sounds/default_water_footstep.1.ogg
Normal file
BIN
mods/default/sounds/default_water_footstep.1.ogg
Normal file
Binary file not shown.
BIN
mods/default/sounds/default_water_footstep.2.ogg
Normal file
BIN
mods/default/sounds/default_water_footstep.2.ogg
Normal file
Binary file not shown.
BIN
mods/default/sounds/default_water_footstep.3.ogg
Normal file
BIN
mods/default/sounds/default_water_footstep.3.ogg
Normal file
Binary file not shown.
BIN
mods/default/sounds/default_water_footstep.4.ogg
Normal file
BIN
mods/default/sounds/default_water_footstep.4.ogg
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue