Skip to content

Commit 0b68b2a

Browse files
committedJul 4, 2016
Fix //shift with absolute axis (x/y/z)
1 parent f72abdb commit 0b68b2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

Diff for: ‎worldedit_commands/cuboid.lua

+6-4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ minetest.register_chatcommand("/shift", {
114114
end
115115

116116
local axis, dir
117-
if direction ~= "?" then
118-
axis, dir = worldedit.translate_direction(name, direction)
119-
else
117+
if direction == "x" or direction == "y" or direction == "z" then
118+
axis, dir = direction, 1
119+
elseif direction == "?" then
120120
axis, dir = worldedit.player_axis(name)
121+
else
122+
axis, dir = worldedit.translate_direction(name, direction)
121123
end
122124

123125
if axis == nil or dir == nil then
@@ -236,4 +238,4 @@ minetest.register_chatcommand("/contract", {
236238
worldedit.marker_update(name)
237239
end,
238240
}
239-
)
241+
)

0 commit comments

Comments
 (0)
Please sign in to comment.