]> git.lizzy.rs Git - worldedit.git/commitdiff
allow multiple //moves
authorKyle <kyle.kylina@gmail.com>
Mon, 10 Sep 2012 04:44:30 +0000 (21:44 -0700)
committerKyle <kyle.kylina@gmail.com>
Mon, 10 Sep 2012 04:44:30 +0000 (21:44 -0700)
init.lua

index dcac7567fc28c5f14b4763ea84fe0fc495e1a262..1948bcf5c4dfe374135a51eda47245a59d7224e0 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -323,6 +323,12 @@ minetest.register_chatcommand("/move", {
                end\r
 \r
                local count = worldedit.move(pos1, pos2, axis, tonumber(amount))\r
+\r
+               worldedit.pos1[name][axis] = worldedit.pos1[name][axis] + amount\r
+               worldedit.pos2[name][axis] = worldedit.pos2[name][axis] + amount\r
+               worldedit.mark_pos1(name)\r
+               worldedit.mark_pos2(name)\r
+\r
                minetest.chat_send_player(name, count .. " nodes moved")\r
        end,\r
 })\r