Skip to content

Commit

Permalink
Update minetest API calls
Browse files Browse the repository at this point in the history
(commited by Blockhead - remember anybody can commit as you, so you need
to GPG sign your commits for them to be worth anything :)
  • Loading branch information
gpcf authored and Montandalar committed Jun 25, 2020
1 parent ead9f0f commit 4f6f8dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
vm:update_map()
vm:update_liquids()

-- call nodeupdate for everything within 1.5x blast radius
-- call minetest.check_for_falling for everything within 1.5x blast radius
for z = -radius * 1.5, radius * 1.5 do
for x = -radius * 1.5, radius * 1.5 do
for y = -radius * 1.5, radius * 1.5 do
local s = vector.add(pos, {x = x, y = y, z = z})
local r = vector.distance(pos, s)
if r / radius < 1.4 then
nodeupdate(s)
minetest.check_for_falling(s)
end
end
end
Expand Down Expand Up @@ -590,7 +590,7 @@ function tnt.register_tnt(def)
on_construct = function(pos)
minetest.sound_play("tnt_ignite", {pos = pos})
minetest.get_node_timer(pos):start(4)
nodeupdate(pos)
minetest.check_for_falling(pos)
end,
})
end
Expand Down

0 comments on commit 4f6f8dd

Please sign in to comment.