From f085d53be29432960cf4cd52f752a1a7aa84ed19 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 7 Oct 2008 14:58:56 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=2345 * Bring llSetLinkTexture into line with llSetLinkColor and lLSetLinkPrimitiveParams() implementations * Thanks ralphos --- .../Shared/Api/Implementation/LSL_Api.cs | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c91159c..cc22994 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1521,6 +1521,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // ScriptSleep(200); } + public void llSetLinkTexture(int linknumber, string texture, int face) + { + m_host.AddScriptLPS(1); + + List parts = GetLinkParts(linknumber); + + foreach (SceneObjectPart part in parts) + SetTexture(part, texture, face); + + // ScriptSleep(200); + } + private void SetTexture(SceneObjectPart part, string texture, int face) { UUID textureID=new UUID(); @@ -8026,22 +8038,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return ret; } - public void llSetLinkTexture(int linknumber, string texture, int face) - { - m_host.AddScriptLPS(1); - - if (m_host.ParentGroup == null) - return; - - SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); - - if (part == null) - return; - - SetTexture(part, texture, face); - // ScriptSleep(200); - } - public LSL_String llStringTrim(string src, int type) { m_host.AddScriptLPS(1); -- cgit v1.1