fix transform:set_pos
This commit is contained in:
@@ -106,10 +106,14 @@ console.add_command(
|
||||
)
|
||||
|
||||
console.add_command(
|
||||
"tp obj:sel=$obj.id x:num~pos.x y:num~pos.y z:num~pos.z",
|
||||
"Teleport object",
|
||||
"tp entity:sel=$entity.id x:num~pos.x y:num~pos.y z:num~pos.z",
|
||||
"Teleport entity",
|
||||
function (args, kwargs)
|
||||
player.set_pos(unpack(args))
|
||||
local eid, x, y, z = unpack(args)
|
||||
local entity = entities.get(eid)
|
||||
if entity ~= nil then
|
||||
entity.transform:set_pos({x, y, z})
|
||||
end
|
||||
end
|
||||
)
|
||||
console.add_command(
|
||||
|
||||
Reference in New Issue
Block a user