TNT: Chain reaction
authorAuke Kok <sofar@foo-projects.org>
Sat, 19 Mar 2016 06:31:10 +0000 (23:31 -0700)
committerparamat <mat.gregory@virginmedia.com>
Sat, 16 Apr 2016 18:27:16 +0000 (19:27 +0100)
With the new high res timer, we can make TNT much better create chain
reactions. This does exactly that.

mods/tnt/init.lua

index 289797ce0b3e49ac280eaf5c6d28311c6a01b99c..4010f98742752400f657dad894d42aa46a6f5c39 100644 (file)
@@ -428,7 +428,9 @@ function tnt.register_tnt(def)
                        end
                end,
                on_blast = function(pos, intensity)
-                       tnt.burn(pos)
+                       minetest.after(0.1, function()
+                               tnt.boom(pos, def)
+                       end)
                end,
                mesecons = {effector = 
                        {action_on =