Skip to content

Commit

Permalink
Fix //shift with absolute axis (x/y/z)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Jul 4, 2016
1 parent f72abdb commit 0b68b2a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions worldedit_commands/cuboid.lua
Expand Up @@ -114,10 +114,12 @@ minetest.register_chatcommand("/shift", {
end

local axis, dir
if direction ~= "?" then
axis, dir = worldedit.translate_direction(name, direction)
else
if direction == "x" or direction == "y" or direction == "z" then
axis, dir = direction, 1
elseif direction == "?" then
axis, dir = worldedit.player_axis(name)
else
axis, dir = worldedit.translate_direction(name, direction)
end

if axis == nil or dir == nil then
Expand Down Expand Up @@ -236,4 +238,4 @@ minetest.register_chatcommand("/contract", {
worldedit.marker_update(name)
end,
}
)
)

0 comments on commit 0b68b2a

Please sign in to comment.