Make TNT play positionally

This commit is contained in:
oilboi 2020-06-24 01:06:04 -04:00
parent ce1af3371f
commit fe1797ffc9
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ for ore,tool_required in pairs(ores) do
}, },
after_destruct = function(pos, oldnode) after_destruct = function(pos, oldnode)
if math.random() > 0.95 then if math.random() > 0.95 then
minetest.sound_play("tnt_ignite") minetest.sound_play("tnt_ignite",{pos=pos,max_hear_distance=64})
minetest.after(1.5, function(pos) minetest.after(1.5, function(pos)
tnt(pos,5) tnt(pos,5)
end,pos) end,pos)

View File

@ -71,7 +71,7 @@ for i = 0,1 do
light_source = 7, light_source = 7,
after_destruct = function(pos, oldnode) after_destruct = function(pos, oldnode)
if math.random() > 0.95 then if math.random() > 0.95 then
minetest.sound_play("tnt_ignite") minetest.sound_play("tnt_ignite",{pos=pos,max_hear_distance=64})
minetest.after(1.5, function(pos) minetest.after(1.5, function(pos)
tnt(pos,5) tnt(pos,5)
end,pos) end,pos)