Skip to content

Commit

Permalink
Make //fixlight work again
Browse files Browse the repository at this point in the history
The dig-air-nodes method seems to have stopped working a few Minetest version ago
  • Loading branch information
sfan5 committed Jan 2, 2017
1 parent 3a7fb5b commit 92fe95f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions worldedit/manipulations.lua
Expand Up @@ -575,14 +575,11 @@ end
function worldedit.fixlight(pos1, pos2)
local pos1, pos2 = worldedit.sort_pos(pos1, pos2)

worldedit.keep_loaded(pos1, pos2)
local vmanip = minetest.get_voxel_manip(pos1, pos2)
vmanip:write_to_map()
vmanip:update_map() -- this updates the lighting

local nodes = minetest.find_nodes_in_area(pos1, pos2, "air")
local dig_node = minetest.dig_node
for _, pos in ipairs(nodes) do
dig_node(pos)
end
return #nodes
return worldedit.volume(pos1, pos2)
end


Expand Down

0 comments on commit 92fe95f

Please sign in to comment.