From 64c80aec644b2fede1b08ad360f54a658d4849cb Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Mon, 5 Nov 2012 19:16:46 +0100 Subject: llSetLinkCamera implementation wiki: http://wiki.secondlife.com/wiki/LlSetLinkCamera mantis: http://opensimulator.org/mantis/view.php?id=6397 --- .../Shared/Api/Implementation/LSL_Api.cs | 30 ++++++++++++++++++++++ .../ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | 1 + .../ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | 5 ++++ 3 files changed, 36 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index be030af..acf4d8c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6637,6 +6637,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.SetCameraAtOffset(offset); } + public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) + { + m_host.AddScriptLPS(1); + + if (link == ScriptBaseClass.LINK_SET || + link == ScriptBaseClass.LINK_ALL_CHILDREN || + link == ScriptBaseClass.LINK_ALL_OTHERS) return; + + SceneObjectPart part = null; + + switch (link) + { + case ScriptBaseClass.LINK_ROOT: + part = m_host.ParentGroup.RootPart; + break; + case ScriptBaseClass.LINK_THIS: + part = m_host; + break; + default: + part = m_host.ParentGroup.GetLinkNumPart(link); + break; + } + + if (null != part) + { + part.SetCameraEyeOffset(eye); + part.SetCameraAtOffset(at); + } + } + public LSL_String llDumpList2String(LSL_List src, string seperator) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index e97ff9d..98f8be7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -333,6 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces void llSetBuoyancy(double buoyancy); void llSetCameraAtOffset(LSL_Vector offset); void llSetCameraEyeOffset(LSL_Vector offset); + void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at); void llSetCameraParams(LSL_List rules); void llSetClickAction(int action); void llSetColor(LSL_Vector color, int face); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index c457880..36803a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -1498,6 +1498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase m_LSL_Functions.llSetCameraEyeOffset(offset); } + public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) + { + m_LSL_Functions.llSetLinkCamera(link, eye, at); + } + public void llSetCameraParams(LSL_List rules) { m_LSL_Functions.llSetCameraParams(rules); -- cgit v1.1