Skip to content

Commit 7a892c7

Browse files
sofarparamat
authored andcommittedApr 26, 2016
TNT: self-start boom removal timer.
1 parent 682d79b commit 7a892c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

Diff for: ‎mods/tnt/init.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ end
299299
function tnt.boom(pos, def)
300300
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
301301
minetest.set_node(pos, {name = "tnt:boom"})
302-
minetest.get_node_timer(pos):start(0.5)
303302
local drops = tnt_explode(pos, def.radius, def.ignore_protection,
304303
def.ignore_on_blast)
305304
entity_physics(pos, def.damage_radius)
@@ -316,6 +315,9 @@ minetest.register_node("tnt:boom", {
316315
walkable = false,
317316
drop = "",
318317
groups = {dig_immediate = 3},
318+
on_construct = function(pos)
319+
minetest.get_node_timer(pos):start(0.5)
320+
end,
319321
on_timer = function(pos, elapsed)
320322
minetest.remove_node(pos)
321323
end,

0 commit comments

Comments
 (0)
Please sign in to comment.