From 9fc29e1595f921bda761d71da59162f31cc32799 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 20 May 2011 20:19:32 +0100 Subject: Implement llGetLinKNumberOfSides(). Based on code in http://opensimulator.org/mantis/view.php?id=5489 Thanks onesong. --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (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 cb3bddc..1cf03b8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4458,10 +4458,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return result; } - public void llGetLinkNumberOfSides(int link) + public LSL_Integer llGetLinkNumberOfSides(int link) { m_host.AddScriptLPS(1); - NotImplemented("llGetLinkNumberOfSides"); + + SceneObjectPart linkedPart; + + if (link == ScriptBaseClass.LINK_ROOT) + linkedPart = m_host.ParentGroup.RootPart; + else if (link == ScriptBaseClass.LINK_THIS) + linkedPart = m_host; + else + linkedPart = m_host.ParentGroup.GetLinkNumPart(link); + + return GetNumberOfSides(linkedPart); } public LSL_Integer llGetNumberOfSides() -- cgit v1.1