mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-08-20 21:44:06 +02:00
Simplify srect function
This commit is contained in:
parent
0c4736fbc2
commit
727ee41e72
@ -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 New Issue
Block a user