//rotate: update pos1/pos2 to bound target region

...unfortunately this has exposed a nasty bug!
This commit is contained in:
Starbeamrainbowlabs 2023-12-16 00:01:34 +00:00
parent 39f671c1ef
commit 0ac76bc694
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 6 additions and 1 deletions

View file

@ -136,6 +136,8 @@ function worldeditadditions.rotate(pos1, pos2, origin, rotlist)
--- 8: Return
return true, {
count_rotated = count_rotated
count_rotated = count_rotated,
pos1_dstvm = pos1_dstvm,
pos2_dstvm = pos2_dstvm
}
end

View file

@ -118,6 +118,9 @@ worldeditadditions_core.register_command("rotate+", {
)
if not success then return success, stats end
wea_c.pos.set1(name, stats.pos1_dstvm + Vector3.new(1, 1, 1))
wea_c.pos.set2(name, stats.pos2_dstvm - Vector3.new(1, 1, 1))
-- TODO: Adjust the defined area to match the target here? Maybe make this optional somehow given the target may or may nor be axis-aligned
-------------------------------------------------
local time_taken = wea_c.get_ms_time() - start_time