aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorSignpostMarv2012-10-18 10:18:46 +0100
committerJustin Clark-Casey (justincc)2012-10-19 02:48:59 +0100
commit645e3171b41be4c5611bb43a9c14ec1d501ff8b9 (patch)
tree114d809924b68cfd2a777fa6315f1e383e2d6e03 /OpenSim/Region
parentthe simplest case for llGetLinkName also applies to the LINK_THIS constant (diff)
downloadopensim-SC-645e3171b41be4c5611bb43a9c14ec1d501ff8b9.zip
opensim-SC-645e3171b41be4c5611bb43a9c14ec1d501ff8b9.tar.gz
opensim-SC-645e3171b41be4c5611bb43a9c14ec1d501ff8b9.tar.bz2
opensim-SC-645e3171b41be4c5611bb43a9c14ec1d501ff8b9.tar.xz
since llGetLinkName has a "simplest case", it should be the first check made.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e8d0bea..e8bf5cf 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3804,6 +3804,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3804 public LSL_String llGetLinkName(int linknum) 3804 public LSL_String llGetLinkName(int linknum)
3805 { 3805 {
3806 m_host.AddScriptLPS(1); 3806 m_host.AddScriptLPS(1);
3807 // simplest case, this prims link number
3808 if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
3809 return m_host.Name;
3810
3807 // parse for sitting avatare-names 3811 // parse for sitting avatare-names
3808 List<String> nametable = new List<String>(); 3812 List<String> nametable = new List<String>();
3809 World.ForEachRootScenePresence(delegate(ScenePresence presence) 3813 World.ForEachRootScenePresence(delegate(ScenePresence presence)
@@ -3827,10 +3831,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3827 return nametable[totalprims - linknum]; 3831 return nametable[totalprims - linknum];
3828 } 3832 }
3829 3833
3830 // simplest case, this prims link number
3831 if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
3832 return m_host.Name;
3833
3834 // Single prim 3834 // Single prim
3835 if (m_host.LinkNum == 0) 3835 if (m_host.LinkNum == 0)
3836 { 3836 {