mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 15:33:00 +00:00
pos1-2 better implementation (used round)
This commit is contained in:
parent
d2fb6db3d0
commit
7766af8a8a
1 changed files with 62 additions and 63 deletions
|
@ -4,8 +4,7 @@ local Vector3 = weac.Vector3
|
||||||
|
|
||||||
local function do_set(name, i)
|
local function do_set(name, i)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
local addend = Vector3.new(0,1,0) -- Add one on the y axis
|
weac.pos.set(name, i, Vector3.round(player:get_pos()))
|
||||||
weac.pos.set(name, i, Vector3.floor(player:get_pos()) + addend)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function do_set1(name, params_text)
|
local function do_set1(name, params_text)
|
||||||
|
|
Loading…
Reference in a new issue