]> git.lizzy.rs Git - worldedit.git/commitdiff
Fix //shift with absolute axis (x/y/z)
authorsfan5 <sfan5@live.de>
Mon, 4 Jul 2016 17:51:28 +0000 (19:51 +0200)
committersfan5 <sfan5@live.de>
Mon, 4 Jul 2016 17:51:28 +0000 (19:51 +0200)
worldedit_commands/cuboid.lua

index 24dad28b3ced4ea3cb1ee4c6fa783a954eeff628..c588b748020cb0bc88579b6d0880165daabb4956 100644 (file)
@@ -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
@@ -236,4 +238,4 @@ minetest.register_chatcommand("/contract", {
        worldedit.marker_update(name)
       end,
   }
-)
\ No newline at end of file
+)