diff options
author | Daniel Sosa <sosa.daniel23@gmail.com> | 2015-01-11 13:12:37 +0000 |
---|---|---|
committer | Daniel Sosa <sosa.daniel23@gmail.com> | 2016-07-03 21:44:02 -0500 |
commit | 40cee997006a976acdf89dc610d8ac15232c3645 (patch) | |
tree | 5b3b5cd713425be1b027c64b611a29cba2eb3c12 | |
parent | 04d20de4cd9bc55fc37889ee53fd827e5ebcf9a0 (diff) |
Fix a crash that happened when trying to shift the cuboid using relative direction while looking straight up or down
-rw-r--r-- | worldedit_commands/cuboid.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/worldedit_commands/cuboid.lua b/worldedit_commands/cuboid.lua index 35f2bfc..9bc2822 100644 --- a/worldedit_commands/cuboid.lua +++ b/worldedit_commands/cuboid.lua @@ -108,6 +108,10 @@ minetest.register_chatcommand("/shift", { axis, dir = worldedit.player_axis(name) end + if axis == nil or dir == nil then + return false, "Invalid if looking up or down" + end + assert(worldedit.cuboid_shift(name, axis, amount * dir)) worldedit.marker_update(name) |