Fire: omit sounds if sound API not supported by lame fire mods :)

tenplus1's version of the fire mod removes all sound support. This
code makes this mod work if people are using his version of the
fire mod.
This commit is contained in:
Auke Kok 2016-03-14 23:16:58 -07:00
parent 2743d4a1d6
commit 846079370f
1 changed files with 3 additions and 1 deletions

View File

@ -200,7 +200,9 @@ minetest.register_node("lightning:dying_flame", {
on_construct = function(pos)
minetest.get_node_timer(pos):start(rng:next(20, 40))
minetest.after(0.5, fire.on_flame_add_at, pos)
if fire and fire.on_flame_add_at then
minetest.after(0.5, fire.on_flame_add_at, pos)
end
end,
})