aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie2012-10-20 02:33:24 +0100
committerMelanie2012-10-20 02:33:24 +0100
commit6ad8d3c43f130dfb80a7543e139ffa4dacb840ad (patch)
tree24baeecab6becf3bb30c26046ea95b75e6bbdc0f /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentMerge branch 'master' into careminster (diff)
parentminor: Rename assetCache constructor param in UUIDGatherer to assetService wh... (diff)
downloadopensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.zip
opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.gz
opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.bz2
opensim-SC_OLD-6ad8d3c43f130dfb80a7543e139ffa4dacb840ad.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
1 files changed, 15 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 17e3de1..de49d6d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4125,6 +4125,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4125 } 4125 }
4126 4126
4127 /// <summary> 4127 /// <summary>
4128 /// Returns the name of the child prim or seated avatar matching the
4129 /// specified link number.
4130 /// </summary>
4131 /// <param name="linknum">
4132 /// The number of a link in the linkset or a link-related constant.
4133 /// </param>
4134 /// <returns>
4135 /// The name determined to match the specified link number.
4136 /// </returns>
4137 /// <remarks>
4128 /// The rules governing the returned name are not simple. The only 4138 /// The rules governing the returned name are not simple. The only
4129 /// time a blank name is returned is if the target prim has a blank 4139 /// time a blank name is returned is if the target prim has a blank
4130 /// name. If no prim with the given link number can be found then 4140 /// name. If no prim with the given link number can be found then
@@ -4152,10 +4162,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4152 /// Mentions NULL_KEY being returned 4162 /// Mentions NULL_KEY being returned
4153 /// http://wiki.secondlife.com/wiki/LlGetLinkName 4163 /// http://wiki.secondlife.com/wiki/LlGetLinkName
4154 /// Mentions using the LINK_* constants, some of which are negative 4164 /// Mentions using the LINK_* constants, some of which are negative
4155 /// </summary> 4165 /// </remarks>
4156 public LSL_String llGetLinkName(int linknum) 4166 public LSL_String llGetLinkName(int linknum)
4157 { 4167 {
4158 m_host.AddScriptLPS(1); 4168 m_host.AddScriptLPS(1);
4169 // simplest case, this prims link number
4170 if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
4171 return m_host.Name;
4172
4159 // parse for sitting avatare-names 4173 // parse for sitting avatare-names
4160 List<String> nametable = new List<String>(); 4174 List<String> nametable = new List<String>();
4161 World.ForEachRootScenePresence(delegate(ScenePresence presence) 4175 World.ForEachRootScenePresence(delegate(ScenePresence presence)
@@ -4179,10 +4193,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4179 return nametable[totalprims - linknum]; 4193 return nametable[totalprims - linknum];
4180 } 4194 }
4181 4195
4182 // simplest case, this prims link number
4183 if (m_host.LinkNum == linknum)
4184 return m_host.Name;
4185
4186 // Single prim 4196 // Single prim
4187 if (m_host.LinkNum == 0) 4197 if (m_host.LinkNum == 0)
4188 { 4198 {