]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix stack2 param
authorKodexKy <kodexky@gmail.com>
Tue, 16 Dec 2014 06:44:22 +0000 (02:14 -0430)
committerKodexKy <kodexky@gmail.com>
Tue, 16 Dec 2014 06:44:22 +0000 (02:14 -0430)
Fix stack2 amount count
Fix stack2 sign recognition for y & z

worldedit/manipulations.lua
worldedit_commands/init.lua

index 71eef5deb8cd3d0a1df11c8698b356fe1e618d86..2b16c32a77c1fa62a9ff6e6aaef3993cb260d874 100644 (file)
@@ -286,7 +286,7 @@ worldedit.stack2 = function(pos1, pos2, direction, amount, finished)
        local i = 0\r
        local translated = {x=0,y=0,z=0}\r
        local function nextone()\r
-               if i <= amount then\r
+               if i < amount then\r
                        i = i + 1\r
                        translated.x = translated.x + direction.x\r
                        translated.y = translated.y + direction.y\r
index 93e594a571222742a4165942c2a6c9b74ccab0c8..734150a4d8ef34a0c0bff407dc2539f0e03b43da 100644 (file)
@@ -641,7 +641,7 @@ minetest.register_chatcommand("/stack2", {
                end\r
                repetitions = tonumber(repetitions)\r
 \r
-               local x, y, z = incs:match("([+-]?%d+) ([+-]%d+) ([+-]%d+)")\r
+               local x, y, z = incs:match("([+-]?%d+) ([+-]?%d+) ([+-]?%d+)")\r
                if x == nil then\r
                        worldedit.player_notify(name, "invalid increments: " .. param)\r
                        return\r