diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-10-16 23:34:25 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-10-16 23:34:25 +0300 |
commit | 3ed29a74f734a2b790814970df71a83c6cb47303 (patch) | |
tree | be1423a9e883bb1153764c44258171a29ff6a0e0 /indra/newview/scripts/lua | |
parent | 64ecc38c841ae0cb0c3d0ccb9b1bf543ecf4230e (diff) |
Add a response with result when taking snapshot; and other clean up
Diffstat (limited to 'indra/newview/scripts/lua')
-rw-r--r-- | indra/newview/scripts/lua/require/LLAgent.lua | 6 | ||||
-rw-r--r-- | indra/newview/scripts/lua/require/UI.lua | 2 | ||||
-rw-r--r-- | indra/newview/scripts/lua/test_LLChatListener.lua | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/scripts/lua/require/LLAgent.lua b/indra/newview/scripts/lua/require/LLAgent.lua index b2be69dcdf..6068a916ed 100644 --- a/indra/newview/scripts/lua/require/LLAgent.lua +++ b/indra/newview/scripts/lua/require/LLAgent.lua @@ -116,7 +116,7 @@ end -- Get the nearby avatars in a range of provided "dist", -- if "dist" is not specified, "RenderFarClip" setting is used -- reply will contain "result" table with following fields: --- "id", "global_pos", "region_pos", "name" +-- "id", "global_pos", "region_pos", "name", "region_id" function LLAgent.getNearbyAvatarsList(...) local args = mapargs('dist', ...) args.op = 'getNearbyAvatarsList' @@ -124,14 +124,14 @@ function LLAgent.getNearbyAvatarsList(...) end -- reply will contain "result" table with following fields: --- "id", "global_pos", "region_pos" +-- "id", "global_pos", "region_pos", "region_id" function LLAgent.getNearbyObjectsList(...) local args = mapargs('dist', ...) args.op = 'getNearbyObjectsList' return result(leap.request('LLAgent', args)) end --- Get screen position of your own avatar or any other (if "avatar_id is specified) +-- Get screen position of your own avatar or any other (if "avatar_id" is specified) -- reply contains "x", "y" coordinates and "onscreen" flag to indicate if it's actually in within the current window -- avatar render position is used as the point function LLAgent.getAgentScreenPos(...) diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua index 86aa4095e0..34f3fb75eb 100644 --- a/indra/newview/scripts/lua/require/UI.lua +++ b/indra/newview/scripts/lua/require/UI.lua @@ -141,7 +141,7 @@ end function UI.snapshot(...) local args = mapargs('filename,width,height,showui,showhud,rebuild,type', ...) args.op = 'saveSnapshot' - return leap.request('LLViewerWindow', args) + return leap.request('LLViewerWindow', args).result end -- *************************************************************************** diff --git a/indra/newview/scripts/lua/test_LLChatListener.lua b/indra/newview/scripts/lua/test_LLChatListener.lua index 5679e9f98a..fa00b048b2 100644 --- a/indra/newview/scripts/lua/test_LLChatListener.lua +++ b/indra/newview/scripts/lua/test_LLChatListener.lua @@ -24,11 +24,11 @@ function openOrEcho(message) end local listener = LLListener(LLChat.nearbyChatPump) -local ageint_id = LLAgent.getID() +local agent_id = LLAgent.getID() function listener:handleMessages(event_data) -- ignore messages and commands from other avatars - if event_data.from_id ~= ageint_id then + if event_data.from_id ~= agent_id then return true elseif string.find(event_data.message, '[LUA]') then return true |