]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix area clearing step of negative //move's
authorsfan5 <sfan5@live.de>
Wed, 13 Nov 2019 19:49:25 +0000 (20:49 +0100)
committersfan5 <sfan5@live.de>
Wed, 13 Nov 2019 19:49:25 +0000 (20:49 +0100)
fixes #187

worldedit/manipulations.lua

index 01fb99a3ac195dbf383ae97aa8db8ee1c1c14b67..3bad0ddc5c254b0e4e607fd5bbc48f8fa4c9b792 100644 (file)
@@ -301,7 +301,7 @@ function worldedit.move(pos1, pos2, axis, amount)
                        nuke_area({x=0, y=0, z=0}, leftover)\r
                else\r
                        local top = {x=0, y=0, z=0} -- offset of the leftover slice from pos1\r
-                       top[axis] = dim[axis] - 1\r
+                       top[axis] = dim[axis] - math.abs(amount)\r
                        nuke_area(top, leftover)\r
                end\r
        end\r