mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-08-20 13:34:05 +02:00
pos1-2 better implementation (used round)
This commit is contained in:
parent
d2fb6db3d0
commit
7766af8a8a
@ -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 New Issue
Block a user