mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 06:53:52 +01:00
collapse check
This commit is contained in:
parent
df209a9f61
commit
79211cf8cb
@ -74,7 +74,8 @@ worldedit.register_command("sfactor", {
|
|||||||
elseif mode == "shrink" then int = math.floor(abs / fac) * fac
|
elseif mode == "shrink" then int = math.floor(abs / fac) * fac
|
||||||
else int = math.ceil(abs / fac) * fac end
|
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
|
return int
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user