1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 20:56:02 +02:00

Use new VoxelManip cleanup API

This commit is contained in:
sfan5
2025-05-30 18:51:40 +02:00
parent a6bf9dd526
commit 0351c66915
3 changed files with 18 additions and 13 deletions

View File

@ -332,6 +332,9 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne
vm1:set_data(data)
vm1:write_to_map()
if vm1.close ~= nil then
vm1:close()
end
-- recalculate new radius
radius = math.floor(radius * math.pow(count, 1/3))
@ -386,8 +389,10 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owne
vm:set_data(data)
vm:write_to_map()
vm:update_map()
vm:update_liquids()
if vm.close ~= nil then
vm:close()
end
-- call check_single_for_falling for everything within 1.5x blast radius
for y = -radius * 1.5, radius * 1.5 do