From: Rui Date: Sat, 14 Mar 2015 04:30:25 +0000 (+0900) Subject: Add max_hear_distance for fire X-Git-Tag: 0.4.13~88 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9c15ebccab09208886ebe9639c75199ba83d89c3;p=oweals%2Fminetest_game.git Add max_hear_distance for fire --- diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 5b0008f1..309c3988 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -63,7 +63,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}), + handle = minetest.sound_play(wanted_sound, {pos=cp, max_hear_distance = 16, loop=true}), name = wanted_sound.name, } end @@ -74,7 +74,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}), + handle = minetest.sound_play(wanted_sound, {pos=cp, max_hear_distance = 16, loop=true}), name = wanted_sound.name, } end