Skip to content

Commit

Permalink
Fix //copy, //move, and //stack with negative amounts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Uberi committed Aug 16, 2012
1 parent 8cd32bc commit 87f23b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions.lua
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 87f23b8

Please sign in to comment.