Fix some bugs, but the new //subdivide still doesn't work yet

This commit is contained in:
Starbeamrainbowlabs 2020-10-10 21:50:03 +01:00
parent aa234595a8
commit 2ac6ea03a7
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
3 changed files with 5 additions and 5 deletions

@ -50,13 +50,13 @@ local function subdivide_step_complete(state)
end
local function subdivide_step_beforeload(state)
state.cpos.z = state.cpos.z - (chunk_size.z + 1)
state.cpos.z = state.cpos.z - (state.chunk_size.z + 1)
if state.cpos.z <= state.pos1.z then
state.cpoz.z = state.pos2.z
state.cpos.y = state.cpos.y - (chunk_size.y + 1)
state.cpos.y = state.cpos.y - (state.chunk_size.y + 1)
if state.cpos.y <= state.pos1.y then
state.cpos.y = state.pos2.y
state.cpos.x = state.cpos.x - (chunk_size.x + 1)
state.cpos.x = state.cpos.x - (state.chunk_size.x + 1)
if state.cpos.x <= state.pos1.x then
subdivide_step_complete(state)
return

@ -86,5 +86,5 @@ function worldeditadditions.emerge_area(pos1, pos2, callback, callback_state)
callback = callback,
callback_state = callback_state
}
minetest.emerge_area(pos1, pos2, emerge_callback, states)
minetest.emerge_area(pos1, pos2, emerge_callback, state)
end

@ -84,7 +84,7 @@ worldedit.register_command("subdivide", {
local msg_prefix = "[ subdivide | "..table.concat({cmd_name, args}, " ").." ] "
local time_last_msg = wea.get_ms_time()
wea.subdivide(cpos1, cpos2, chunk_size, function(bpos1, bpos2, stats)
wea.subdivide(pos1, pos2, chunk_size, function(cpos1, cpos2, stats)
-- Called on every subblock
if stats.chunks_completed == 0 then
worldedit.player_notify(name, string.format(