Skip to content

Commit

Permalink
Fix the //move command (WorldEdit API is unaffected).
Browse files Browse the repository at this point in the history
  • Loading branch information
Uberi committed May 18, 2013
1 parent 52c1379 commit d7ae19b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion worldedit/init.lua
@@ -1,4 +1,4 @@
local path = minetest.get_modpath("worldedit")
local path = minetest.get_modpath(minetest.get_current_modname())

local loadmodule = function(path)
return pcall(function()
Expand Down
12 changes: 5 additions & 7 deletions worldedit_commands/init.lua
Expand Up @@ -560,18 +560,16 @@ minetest.register_chatcommand("/move", {
amount = amount * sign
end

local count = worldedit.move(pos1, pos2, axis, tonumber(amount))
local tenv = minetest.env
if worldedit.ENABLE_QUEUE then
tenv = worldedit.quene_aliasenv
end
local count = worldedit.move(pos1, pos2, axis, tonumber(amount), tenv)

pos1[axis] = pos1[axis] + amount
pos2[axis] = pos2[axis] + amount
worldedit.mark_pos1(name)
worldedit.mark_pos2(name)

local tenv = minetest.env
if worldedit.ENABLE_QUEUE then
tenv = worldedit.quene_aliasenv
end
local count = worldedit.copy(pos1, pos2, axis, tonumber(amount), tenv)
worldedit.player_notify(name, count .. " nodes moved")
end,
})
Expand Down

0 comments on commit d7ae19b

Please sign in to comment.