mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -4125,6 +4125,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the child prim or seated avatar matching the
|
||||
/// specified link number.
|
||||
/// </summary>
|
||||
/// <param name="linknum">
|
||||
/// The number of a link in the linkset or a link-related constant.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The name determined to match the specified link number.
|
||||
/// </returns>
|
||||
/// <remarks>
|
||||
/// The rules governing the returned name are not simple. The only
|
||||
/// time a blank name is returned is if the target prim has a blank
|
||||
/// name. If no prim with the given link number can be found then
|
||||
@@ -4152,10 +4162,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// Mentions NULL_KEY being returned
|
||||
/// http://wiki.secondlife.com/wiki/LlGetLinkName
|
||||
/// Mentions using the LINK_* constants, some of which are negative
|
||||
/// </summary>
|
||||
/// </remarks>
|
||||
public LSL_String llGetLinkName(int linknum)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
// simplest case, this prims link number
|
||||
if (linknum == m_host.LinkNum || linknum == ScriptBaseClass.LINK_THIS)
|
||||
return m_host.Name;
|
||||
|
||||
// parse for sitting avatare-names
|
||||
List<String> nametable = new List<String>();
|
||||
World.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
@@ -4179,10 +4193,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return nametable[totalprims - linknum];
|
||||
}
|
||||
|
||||
// simplest case, this prims link number
|
||||
if (m_host.LinkNum == linknum)
|
||||
return m_host.Name;
|
||||
|
||||
// Single prim
|
||||
if (m_host.LinkNum == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user