From cd2c5843a86af5b6b49b6675e90b702b479fd258 Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Thu, 2 Aug 2012 11:19:33 +0100 Subject: reduced-complexity implementation of function to get rezzing object key Signed-off-by: Melanie --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 8 ++++++++ OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 6 ++++++ OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | 5 +++++ 3 files changed, 19 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 44de176..e5a4fe8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3314,5 +3314,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return Math.Max(a, b); } + + public LSL_Key osGetRezzingObject() + { + CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); + m_host.AddScriptLPS(1); + + return new LSL_Key(m_host.ParentGroup.RezzingObjectID.ToString()); + } } } \ No newline at end of file diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index f73a85e..1f000a3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs @@ -299,5 +299,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces /// /// LSL_Float osMax(double a, double b); + + /// + /// Get the key of the object that rezzed this object. + /// + /// Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown. + LSL_Key osGetRezzingObject(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 53daa13..94405d2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -945,5 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osMax(a, b); } + + public LSL_Key osGetRezzingObject() + { + return m_OSSL_Functions.osGetRezzingObject(); + } } } -- cgit v1.1 From 513b77b78d8990b1f7edd0f91625f286286e131d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 02:26:54 +0100 Subject: refactor: rename SOG.RezzingObjectID to SOG.FromPartID to match FromFolderID, FromItemID and to reflect that it's a SOP ID rather than a SOG ID. --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e5a4fe8..bcd1a6f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -3320,7 +3320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); m_host.AddScriptLPS(1); - return new LSL_Key(m_host.ParentGroup.RezzingObjectID.ToString()); + return new LSL_Key(m_host.ParentGroup.FromPartID.ToString()); } } } \ No newline at end of file -- cgit v1.1