diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-08-16 16:21:00 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-08-16 16:21:00 -0400 |
commit | 87f23b86473eaba24503550584c5ea100b98fc5b (patch) | |
tree | 0438686f3b11b81134202d1c83b11320f433e2ad /functions.lua | |
parent | 8cd32bcc59766f6c2aba77da7f64ea9882e97813 (diff) |
Fix //copy, //move, and //stack with negative amounts.
Diffstat (limited to 'functions.lua')
-rw-r--r-- | functions.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.lua b/functions.lua index 7912b9e..625fafb 100644 --- a/functions.lua +++ b/functions.lua @@ -86,7 +86,7 @@ worldedit.copy = function(pos1, pos2, axis, amount) while pos.z <= pos2.z do
local node = env:get_node(pos)
local value = pos[axis]
- pos[axis] = value - amount
+ pos[axis] = value + amount
env:add_node(pos, node)
pos[axis] = value
pos.z = pos.z + 1
@@ -132,7 +132,7 @@ worldedit.move = function(pos1, pos2, axis, amount) local node = env:get_node(pos)
env:remove_node(pos)
local value = pos[axis]
- pos[axis] = value - amount
+ pos[axis] = value + amount
env:add_node(pos, node)
pos[axis] = value
pos.z = pos.z + 1
|