From 059f4b6a3a870fdbb246ed2a4109cbf28b58ca7d Mon Sep 17 00:00:00 2001 From: SignpostMarv Martin Date: Tue, 25 Oct 2011 13:27:09 +0100 Subject: Implementing PRIM_LINK_TARGET, but only for setting params Signed-off-by: BlueWall --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 17 +++++++++++++---- .../ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b8e9878..fe8d358 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7014,10 +7014,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); - List parts = GetLinkParts(linknumber); - - foreach (SceneObjectPart part in parts) - SetPrimParams(part, rules); + setLinkPrimParams(linknumber, rules); ScriptSleep(200); } @@ -7026,6 +7023,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); + setLinkPrimParams(linknumber, rules); + } + + protected void setLinkPrimParams(int linknumber, LSL_List rules) + { List parts = GetLinkParts(linknumber); foreach (SceneObjectPart part in parts) @@ -7395,6 +7397,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_Rotation lr = rules.GetQuaternionItem(idx++); SetRot(part, Rot2Quaternion(lr)); break; + case (int)ScriptBaseClass.PRIM_LINK_TARGET: + if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless. + return; + LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++); + LSL_List new_rules = rules.GetSublist(idx, -1); + setLinkPrimParams((int)new_linknumber, new_rules); + return; } } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 4b008a4..50c18a8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -321,6 +321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int PRIM_NAME = 27; public const int PRIM_DESC = 28; public const int PRIM_ROT_LOCAL = 29; + public const int PRIM_LINK_TARGET = 34; public const int PRIM_TEXGEN_DEFAULT = 0; public const int PRIM_TEXGEN_PLANAR = 1; -- cgit v1.1