mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 15:33:00 +00:00
migrated mtools to WEA pos system
This commit is contained in:
parent
72ab9e0d64
commit
29bac504b0
3 changed files with 6 additions and 6 deletions
|
@ -18,8 +18,8 @@ worldeditadditions_core.register_command("midpos", {
|
|||
func = function(name, params_text)
|
||||
local str = "The centre of the current selection is at "
|
||||
|
||||
local pos1 = Vector3.clone(worldedit.pos1[name])
|
||||
local pos2 = Vector3.clone(worldedit.pos2[name])
|
||||
local pos1 = Vector3.clone(wea_c.pos.get(name, 1))
|
||||
local pos2 = Vector3.clone(wea_c.pos.get(name, 2))
|
||||
|
||||
|
||||
local vec = Vector3.mean(pos1, pos2)
|
||||
|
|
|
@ -19,8 +19,8 @@ worldeditadditions_core.register_command("msize", {
|
|||
func = function(name, params_text)
|
||||
local str = "The dimensions of the current selection are "
|
||||
|
||||
local pos1 = Vector3.clone(worldedit.pos1[name])
|
||||
local pos2 = Vector3.clone(worldedit.pos2[name])
|
||||
local pos1 = Vector3.clone(wea_c.pos.get(name, 1))
|
||||
local pos2 = Vector3.clone(wea_c.pos.get(name, 2))
|
||||
|
||||
local vec = (pos2 - pos1):abs()
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ worldeditadditions_core.register_command("mtrig", {
|
|||
func = function(name, params_text)
|
||||
local str = "The measurements of the line from pos1 to pos2 are Length (D): "
|
||||
|
||||
local pos1 = Vector3.clone(worldedit.pos2[name])
|
||||
local pos2 = Vector3.clone(worldedit.pos1[name])
|
||||
local pos1 = Vector3.clone(wea_c.pos.get(name, 2))
|
||||
local pos2 = Vector3.clone(wea_c.pos.get(name, 1))
|
||||
|
||||
local vec = (pos2 - pos1):abs()
|
||||
local len = vec:length()
|
||||
|
|
Loading…
Reference in a new issue