summaryrefslogtreecommitdiff
path: root/worldedit_commands/init.lua
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2013-05-18 19:00:12 -0400
committerAnthony Zhang <azhang9@gmail.com>2013-05-18 19:00:12 -0400
commitd7ae19b7b87137d480ff7b51014d1379955ef664 (patch)
treec5b76f45d29a382d28518e666a3ef48c8803bc8b /worldedit_commands/init.lua
parent52c1379bce43aaab5217643403eb9a4d83459b05 (diff)
Fix the //move command (WorldEdit API is unaffected).
Diffstat (limited to 'worldedit_commands/init.lua')
-rw-r--r--worldedit_commands/init.lua12
1 files changed, 5 insertions, 7 deletions
diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua
index 6830194..c90e855 100644
--- a/worldedit_commands/init.lua
+++ b/worldedit_commands/init.lua
@@ -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,
})