mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-01 05:43:01 +00:00
stabilizing fixes
This commit is contained in:
parent
4ff01bba4e
commit
23aae6959f
3 changed files with 8 additions and 3 deletions
|
@ -29,8 +29,9 @@ worldeditadditions_core.register_command("sgrow", {
|
|||
if not pos2 then wea_c.pos.set(name, 2, pos1)
|
||||
else pos1, pos2 = Vector3.sort(pos1, pos2) end
|
||||
|
||||
pos1, pos2 = pos1:add(min), pos1:add(max)
|
||||
pos1, pos2 = pos1:add(min), pos2:add(max)
|
||||
|
||||
wea_c.pos.clear(name)
|
||||
wea_c.pos.set_all(name, {pos1, pos2})
|
||||
return true, "Pos1 set to "..pos1..", Pos2 set to "..pos2
|
||||
end,
|
||||
|
|
|
@ -22,10 +22,13 @@ worldeditadditions_core.register_command("srel", {
|
|||
end,
|
||||
func = function(name, params_text)
|
||||
local facing = wea_c.player_dir(name)
|
||||
local vec = wea_c.parse.directions(params_text, facing, true)
|
||||
local vec, err = wea_c.parse.directions(params_text, facing, true)
|
||||
if not vec then return false, err end
|
||||
|
||||
local pos1 = wea_c.pos.get(name, 1)
|
||||
local pos2 = pos1:add(vec)
|
||||
|
||||
wea_c.pos.clear(name)
|
||||
wea_c.pos.set_all(name, {pos1, pos2})
|
||||
return true, "Pos1 set to "..pos1..", Pos2 set to "..pos2
|
||||
end,
|
||||
|
|
|
@ -29,8 +29,9 @@ worldeditadditions_core.register_command("shrink", {
|
|||
if not pos2 then wea_c.pos.set(name, 2, pos1)
|
||||
else pos1, pos2 = Vector3.sort(pos1, pos2) end
|
||||
|
||||
pos1, pos2 = pos1:add(max), pos1:add(min)
|
||||
pos1, pos2 = pos1:add(max), pos2:add(min)
|
||||
|
||||
wea_c.pos.clear(name)
|
||||
wea_c.pos.set_all(name, {pos1, pos2})
|
||||
return true, "Pos1 set to "..pos1..", Pos2 set to "..pos2
|
||||
end,
|
||||
|
|
Loading…
Reference in a new issue