Skip to content

Commit

Permalink
TNT: Only burn visually connected powder (#1857)
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Jul 29, 2017
1 parent c81165b commit fa4c77f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mods/tnt/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit fa4c77f

Please sign in to comment.