mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-02-23 23:00:19 +01:00
Fix a crash that happened when trying to shift the cuboid using relative direction while looking straight up or down
This commit is contained in:
parent
e494f70b3e
commit
eaffe7e347
@ -108,6 +108,10 @@ minetest.register_chatcommand("/shift", {
|
|||||||
axis, dir = worldedit.player_axis(name)
|
axis, dir = worldedit.player_axis(name)
|
||||||
end
|
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))
|
assert(worldedit.cuboid_shift(name, axis, amount * dir))
|
||||||
worldedit.marker_update(name)
|
worldedit.marker_update(name)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user