summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-01-02 19:03:21 +0100
committersfan5 <sfan5@live.de>2017-01-02 19:03:21 +0100
commit92fe95fab78de668f6732648644be0b9a768d298 (patch)
tree54e8e7532dc410382a2ddd90f3862fb861739862
parent3a7fb5bf1eefbc623658ccb2c6500b8e2f7ad766 (diff)
Make //fixlight work again
The dig-air-nodes method seems to have stopped working a few Minetest version ago
-rw-r--r--worldedit/manipulations.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/worldedit/manipulations.lua b/worldedit/manipulations.lua
index cf95517..57c7a76 100644
--- a/worldedit/manipulations.lua
+++ b/worldedit/manipulations.lua
@@ -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