collapse check

This commit is contained in:
VorTechnix 2021-06-27 15:11:00 -07:00
parent df209a9f61
commit 79211cf8cb

View file

@ -74,7 +74,8 @@ worldedit.register_command("sfactor", {
elseif mode == "shrink" then int = math.floor(abs / fac) * fac
else int = math.ceil(abs / fac) * fac end
if neg then int = int * -1 end
if int < fac then int = fac end -- Ensure selection doesn't collapse to 0
if neg then int = int * -1 end -- Ensure correct facing direction
return int
end