rather than copy the re-check log back into the block log when it comes

time to run through it, just use it in-place, copying its entries back
to the main block log if they have to be skipped again (essentially
using the re-check list and the end of the block log as a double buffer)
This commit is contained in:
Vanessa Dannenberg
2021-04-07 01:44:31 -04:00
parent e346fd599f
commit 531577afcf
2 changed files with 38 additions and 15 deletions

View File

@ -70,10 +70,5 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
end
end
end
if #biome_lib.block_recheck_list > 0 then
for i = 1, #biome_lib.block_recheck_list do
biome_lib.block_log[#biome_lib.block_log + 1] = table.copy(biome_lib.block_recheck_list[i])
end
end
biome_lib.block_recheck_list = {}
biome_lib.run_block_recheck_list = true
end)