mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-26 00:53:00 +00:00
collapse check
This commit is contained in:
parent
df209a9f61
commit
79211cf8cb
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue