projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1aeb2ba
)
TNT: Only burn visually connected powder (#1857)
author
SmallJoker
<SmallJoker@users.noreply.github.com>
Sat, 29 Jul 2017 16:09:15 +0000
(18:09 +0200)
committer
sfan5
<sfan5@live.de>
Sun, 19 Nov 2017 21:57:28 +0000
(22:57 +0100)
mods/tnt/init.lua
patch
|
blob
|
history
diff --git
a/mods/tnt/init.lua
b/mods/tnt/init.lua
index 5500d6419a0923145ef7062b5de772347666f970..606ab6afe9b7d3cfb753208faa7e85dbe9664f38 100644
(file)
--- 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