mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user