add LSL_Integer osGetLinkNumber(LSL_String name). uses a cache for the string to linknumber map, cache invalidations may still be missing :(

This commit is contained in:
UbitUmarov
2017-04-04 19:27:45 +01:00
parent ca250e0b0b
commit e237e1b2fa
4 changed files with 77 additions and 0 deletions

View File

@@ -4663,5 +4663,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
sog.TeleportObject(myid, targetPos, rotation, flags);
// a delay here may break vehicles
}
public LSL_Integer osGetLinkNumber(LSL_String name)
{
m_host.AddScriptLPS(1);
SceneObjectGroup sog = m_host.ParentGroup;
if(sog== null || sog.IsDeleted)
return -1;
return sog.GetLinkNumber(name);
}
}
}

View File

@@ -1144,5 +1144,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
m_OSSL_Functions.osTeleportObject(objectUUID, targetPos, targetrotation, flags);
}
public LSL_Integer osGetLinkNumber(LSL_String name)
{
return m_OSSL_Functions.osGetLinkNumber(name);
}
}
}