Fix broken burning sounds

This commit is contained in:
Wuzzy 2020-04-15 14:51:36 +02:00
parent eb68fe8a1c
commit fd416876b7
3 changed files with 4 additions and 4 deletions

View File

@ -184,7 +184,7 @@ minetest.register_abm({
meta:set_string("infotext","Bonfire active: "..percent.."%")
hacky_swap_node(pos,"bonfire:self_active")
if meta:get_int("sound_play") ~= 1 then
meta:set_int("sound_handle", minetest.sound_play("bonfire_burning", {pos=pos, max_hear_distance = 4,loop=true,gain=0.8}, true))
meta:set_int("sound_handle", minetest.sound_play("bonfire_burning", {pos=pos, max_hear_distance = 4,loop=true,gain=0.8}))
meta:set_int("sound_play", 1)
end
meta:set_string("formspec",

View File

@ -62,7 +62,7 @@ function fire.update_sounds_around(pos)
if not sound then
if should_have_sound then
fire.sounds[p0_hash] = {
handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}, true),
handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}),
name = wanted_sound.name,
}
end
@ -73,7 +73,7 @@ function fire.update_sounds_around(pos)
elseif sound.name ~= wanted_sound.name then
minetest.sound_stop(sound.handle)
fire.sounds[p0_hash] = {
handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}, true),
handle = minetest.sound_play(wanted_sound, {pos=cp, loop=true}),
name = wanted_sound.name,
}
end

View File

@ -252,7 +252,7 @@ minetest.register_abm({
meta:set_string("infotext","Furnace active: "..percent.."%")
hacky_swap_node(pos,"furnace:self_active")
if meta:get_int("sound_play") ~= 1 then
meta:set_int("sound_handle", minetest.sound_play("furnace_burning", {pos=pos, max_hear_distance = 8,loop=true}, true))
meta:set_int("sound_handle", minetest.sound_play("furnace_burning", {pos=pos, max_hear_distance = 8,loop=true}))
meta:set_int("sound_play", 1)
end
meta:set_string("formspec",