Check for falling after explosion

This commit is contained in:
Wuzzy 2020-06-04 14:17:04 +02:00
parent 2f9e5d302e
commit 546ee09e6f
1 changed files with 10 additions and 1 deletions

View File

@ -335,7 +335,7 @@ local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire,
end
end
end
-- We use buil_set_node instead of LVM because we want to have on_destruct and
-- We use bulk_set_node instead of LVM because we want to have on_destruct and
-- on_construct being called
if #airs > 0 then
minetest.bulk_set_node(airs, {name="air"})
@ -343,6 +343,15 @@ local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire,
if #fires > 0 then
minetest.bulk_set_node(fires, {name="mcl_core:fire"})
end
-- Update falling nodes
for a=1, #airs do
local p = airs[a]
minetest.check_single_for_falling({x=p.x, y=p.y+1, z=p.z})
end
for f=1, #fires do
local p = fires[f]
minetest.check_single_for_falling({x=p.x, y=p.y+1, z=p.z})
end
-- Log explosion
minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) ..