mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 18:20:38 +01:00
Handle invalid //rotate usage gracefully, fixes #150
This commit is contained in:
parent
f28d9b8d35
commit
f589c988b1
@ -982,7 +982,7 @@ minetest.register_chatcommand("/rotate", {
|
|||||||
worldedit.player_notify(name, "invalid usage: " .. param)
|
worldedit.player_notify(name, "invalid usage: " .. param)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
if angle % 90 ~= 0 then
|
if angle % 90 ~= 0 or angle % 360 == 0 then
|
||||||
worldedit.player_notify(name, "invalid usage: angle must be multiple of 90")
|
worldedit.player_notify(name, "invalid usage: angle must be multiple of 90")
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user