mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-06-05 19:39:57 +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.5.1', mtg: false }
|
||||
- { 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:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -133,7 +133,9 @@ function mh.finish(manip, data)
|
||||
manip:set_data(data)
|
||||
end
|
||||
manip:write_to_map()
|
||||
manip:update_map()
|
||||
if manip.close ~= nil then
|
||||
manip:close() -- explicitly free memory
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -56,8 +56,7 @@ function worldedit.set_param2(pos1, pos2, param2)
|
||||
|
||||
-- Update map
|
||||
manip:set_param2_data(param2_data)
|
||||
manip:write_to_map()
|
||||
manip:update_map()
|
||||
mh.finish(manip)
|
||||
|
||||
return worldedit.volume(pos1, pos2)
|
||||
end
|
||||
@ -269,8 +268,10 @@ function worldedit.fixlight(pos1, pos2)
|
||||
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)
|
||||
|
||||
local vmanip = minetest.get_voxel_manip(pos1, pos2)
|
||||
vmanip:write_to_map()
|
||||
vmanip:update_map() -- this updates the lighting
|
||||
vmanip:write_to_map() -- this updates the lighting
|
||||
if vmanip.close ~= nil then
|
||||
vmanip:close()
|
||||
end
|
||||
|
||||
return worldedit.volume(pos1, pos2)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user