Skip to content

Commit

Permalink
Add max_hear_distance for fire
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui authored and sfan5 committed Mar 29, 2015
1 parent 525f467 commit 9c15ebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mods/fire/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9c15ebc

Please sign in to comment.