mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 15:33:00 +00:00
Simplify srect function
This commit is contained in:
parent
0c4736fbc2
commit
727ee41e72
2 changed files with 5 additions and 2 deletions
|
@ -58,3 +58,7 @@ function worldeditadditions.getsign(str, type)
|
|||
else return true, "+" end
|
||||
end
|
||||
end
|
||||
|
||||
-- For Testing:
|
||||
-- worldeditadditions = {}
|
||||
-- print(worldeditadditions.getsign('-y'))
|
||||
|
|
|
@ -41,8 +41,7 @@ worldedit.register_command("srect", {
|
|||
func = function(name, axis1, axis2, len)
|
||||
if axis1 == "get" then axis1 = worldeditadditions.player_axis2d(name) end
|
||||
|
||||
local pos1 = worldedit.pos1[name]
|
||||
local p2 = vector.new(pos1)
|
||||
local p2 = vector.new(worldedit.pos1[name])
|
||||
|
||||
p2[axis1[2]] = p2[axis1[2]] + tonumber(len) * axis1[1]
|
||||
p2[axis2[2]] = p2[axis2[2]] + tonumber(len) * axis2[1]
|
||||
|
|
Loading…
Reference in a new issue