From: SmallJoker Date: Sat, 29 Jul 2017 16:09:15 +0000 (+0200) Subject: TNT: Only burn visually connected powder (#1857) X-Git-Tag: 0.4.17.1~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=efe6fb6dfbffd260d19e6315ded8873f58faa3c7;p=oweals%2Fminetest_game.git TNT: Only burn visually connected powder (#1857) --- diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index 5500d641..606ab6af 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -513,17 +513,17 @@ minetest.register_node("tnt:gunpowder_burning", { on_timer = function(pos, elapsed) for dx = -1, 1 do for dz = -1, 1 do - for dy = -1, 1 do - if not (dx == 0 and dz == 0) then - tnt.burn({ - x = pos.x + dx, - y = pos.y + dy, - z = pos.z + dz, - }) + if math.abs(dx) + math.abs(dz) == 1 then + for dy = -1, 1 do + tnt.burn({ + x = pos.x + dx, + y = pos.y + dy, + z = pos.z + dz, + }) + end end end end - end minetest.remove_node(pos) end, -- unaffected by explosions