forked from VoxeLibre/VoxeLibre
Check for falling after explosion
This commit is contained in:
parent
2f9e5d302e
commit
546ee09e6f
|
@ -335,7 +335,7 @@ local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire,
|
||||||
end
|
end
|
||||||
end
|
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
|
-- on_construct being called
|
||||||
if #airs > 0 then
|
if #airs > 0 then
|
||||||
minetest.bulk_set_node(airs, {name="air"})
|
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
|
if #fires > 0 then
|
||||||
minetest.bulk_set_node(fires, {name="mcl_core:fire"})
|
minetest.bulk_set_node(fires, {name="mcl_core:fire"})
|
||||||
end
|
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
|
-- Log explosion
|
||||||
minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) ..
|
minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) ..
|
||||||
|
|
Loading…
Reference in New Issue