From 4ae12a08265998055627a0530f6e7ef8da5ca2ed Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 12 Sep 2024 11:05:24 -0400 Subject: Add LLAgent.teleport() Lua function that wraps existing "LLTeleportHandler" LEAP listener. --- indra/newview/scripts/lua/require/LLAgent.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/scripts/lua/require/LLAgent.lua') diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua index 07ef1e0b0b..9eebede59f 100644 --- a/indra/newview/scripts/lua/require/LLAgent.lua +++ b/indra/newview/scripts/lua/require/LLAgent.lua @@ -71,4 +71,12 @@ function LLAgent.getAnimationInfo(item_id) return leap.request('LLAgent', {op = 'getAnimationInfo', item_id=item_id}).anim_info end +-- Teleport to specified "regionname" at specified region-relative "x", "y", "z". +-- If "regionname" omitted, teleport to GLOBAL coordinates "x", "y", "z". +function LLAgent.teleport(...) + local args = mapargs('regionname,x,y,z', ...) + args.op = 'teleport' + return leap.request('LLTeleportHandler', args) +end + return LLAgent -- cgit v1.2.3