fix transform:set_pos

This commit is contained in:
MihailRis
2024-07-11 01:10:23 +03:00
parent a105a4f2c7
commit ee768f878c
3 changed files with 13 additions and 5 deletions
+7 -3
View File
@@ -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(