mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-06-07 12:20:39 +02:00
Use new 5.13.0 explicit VoxelManip free
This commit is contained in:
parent
03d4e45e59
commit
bf154b12c7
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
- { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false }
|
- { image: 'registry.gitlab.com/minetest/minetest/server:5.0.1', mtg: false }
|
||||||
- { image: 'registry.gitlab.com/minetest/minetest/server:5.5.1', mtg: false }
|
- { image: 'registry.gitlab.com/minetest/minetest/server:5.5.1', mtg: false }
|
||||||
- { image: 'ghcr.io/minetest/minetest:5.10.0', mtg: true }
|
- { image: 'ghcr.io/minetest/minetest:5.10.0', mtg: true }
|
||||||
- { image: 'ghcr.io/luanti-org/luanti', mtg: true } # latest git
|
- { image: 'ghcr.io/luanti-org/luanti:master', mtg: true } # latest git
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
@ -133,7 +133,9 @@ function mh.finish(manip, data)
|
|||||||
manip:set_data(data)
|
manip:set_data(data)
|
||||||
end
|
end
|
||||||
manip:write_to_map()
|
manip:write_to_map()
|
||||||
manip:update_map()
|
if manip.close ~= nil then
|
||||||
|
manip:close() -- explicitly free memory
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,8 +56,7 @@ function worldedit.set_param2(pos1, pos2, param2)
|
|||||||
|
|
||||||
-- Update map
|
-- Update map
|
||||||
manip:set_param2_data(param2_data)
|
manip:set_param2_data(param2_data)
|
||||||
manip:write_to_map()
|
mh.finish(manip)
|
||||||
manip:update_map()
|
|
||||||
|
|
||||||
return worldedit.volume(pos1, pos2)
|
return worldedit.volume(pos1, pos2)
|
||||||
end
|
end
|
||||||
@ -269,8 +268,10 @@ function worldedit.fixlight(pos1, pos2)
|
|||||||
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
||||||
|
|
||||||
local vmanip = minetest.get_voxel_manip(pos1, pos2)
|
local vmanip = minetest.get_voxel_manip(pos1, pos2)
|
||||||
vmanip:write_to_map()
|
vmanip:write_to_map() -- this updates the lighting
|
||||||
vmanip:update_map() -- this updates the lighting
|
if vmanip.close ~= nil then
|
||||||
|
vmanip:close()
|
||||||
|
end
|
||||||
|
|
||||||
return worldedit.volume(pos1, pos2)
|
return worldedit.volume(pos1, pos2)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user