mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 23:42:59 +00:00
//subdivide: hrm. maybe a shallowcopy might work?
This commit is contained in:
parent
0e74d22971
commit
ce6ed01b36
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ worldedit.register_command("subdivide", {
|
||||||
local time_total = worldeditadditions.get_ms_time()
|
local time_total = worldeditadditions.get_ms_time()
|
||||||
|
|
||||||
local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name])
|
local pos1, pos2 = worldedit.sort_pos(worldedit.pos1[name], worldedit.pos2[name])
|
||||||
|
pos1 = worldeditadditions.shallowcopy(pos1)
|
||||||
|
pos2 = worldeditadditions.shallowcopy(pos2)
|
||||||
|
-- TODO: Need to clone pos1 & pos2 here, because pass-by-reference
|
||||||
|
-- TODO: We should clone further down too, just in case
|
||||||
local volume = worldedit.volume(pos1, pos2)
|
local volume = worldedit.volume(pos1, pos2)
|
||||||
|
|
||||||
local cmd = worldedit.registered_commands[cmd_name]
|
local cmd = worldedit.registered_commands[cmd_name]
|
||||||
|
|
Loading…
Reference in a new issue