mirror of
https://github.com/minetest-mods/teleport-request.git
synced 2025-01-07 21:47:30 +01:00
Update init.lua
This commit is contained in:
parent
a3d18f5a70
commit
0e0eb50206
2
init.lua
2
init.lua
@ -232,7 +232,7 @@ local function tpj(player,param)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Initially generate the target coords from the player's current position (since it's relative) and then perform the math.
|
-- Initially generate the target coords from the player's current position (since it's relative) and then perform the math.
|
||||||
local target_coords = minetest.get_player_by_name(name):getpos()
|
local target_coords = minetest.get_player_by_name(player):getpos()
|
||||||
if args[1] == "x" then
|
if args[1] == "x" then
|
||||||
target_coords["x"] = target_coords["x"] + tonumber(args[2])
|
target_coords["x"] = target_coords["x"] + tonumber(args[2])
|
||||||
pname:setpos(find_free_position_near(target_coords))
|
pname:setpos(find_free_position_near(target_coords))
|
||||||
|
Loading…
Reference in New Issue
Block a user