Switch bare vectors to vector.new()

This commit is contained in:
sfan5
2023-06-09 14:28:29 +02:00
parent 1a9f66f091
commit 7f7e928dd9
9 changed files with 63 additions and 60 deletions

View File

@ -5,8 +5,8 @@
-- `pos1` is less than or equal to the corresponding component of `pos2`.
-- Returns the new positions.
function worldedit.sort_pos(pos1, pos2)
pos1 = {x=pos1.x, y=pos1.y, z=pos1.z}
pos2 = {x=pos2.x, y=pos2.y, z=pos2.z}
pos1 = vector.new(pos1.x, pos1.y, pos1.z)
pos2 = vector.new(pos2.x, pos2.y, pos2.z)
if pos1.x > pos2.x then
pos2.x, pos1.x = pos1.x, pos2.x
end