Implement osForceBreakAllLinks().
Identical to llBreakAllLinks() except that it doesn't require the script to have link permissions.0.8.0.3
parent
6a279feb2f
commit
873eee5431
|
@ -3930,6 +3930,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return;
|
||||
}
|
||||
|
||||
BreakAllLinks();
|
||||
}
|
||||
|
||||
public void BreakAllLinks()
|
||||
{
|
||||
SceneObjectGroup parentPrim = m_host.ParentGroup;
|
||||
if (parentPrim.AttachmentPoint != 0)
|
||||
return; // Fail silently if attached
|
||||
|
|
|
@ -2350,6 +2350,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
((LSL_Api)m_LSL_Api).BreakLink(linknum);
|
||||
}
|
||||
|
||||
public void osForceBreakAllLinks()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.VeryLow, "osForceBreakAllLinks");
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
InitLSL();
|
||||
((LSL_Api)m_LSL_Api).BreakAllLinks();
|
||||
}
|
||||
|
||||
public LSL_Integer osIsNpc(LSL_Key npc)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.None, "osIsNpc");
|
||||
|
|
|
@ -306,6 +306,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
/// <param name='linknum'></param>
|
||||
void osForceBreakLink(int linknum);
|
||||
|
||||
/// <summary>
|
||||
/// Identical to llBreakAllLinks() but does not require permission from the owner.
|
||||
/// </summary>
|
||||
void osForceBreakAllLinks();
|
||||
|
||||
/// <summary>
|
||||
/// Check if the given key is an npc
|
||||
/// </summary>
|
||||
|
|
|
@ -552,6 +552,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
m_OSSL_Functions.osForceBreakLink(linknum);
|
||||
}
|
||||
|
||||
public void osForceBreakAllLinks()
|
||||
{
|
||||
m_OSSL_Functions.osForceBreakAllLinks();
|
||||
}
|
||||
|
||||
public LSL_Integer osIsNpc(LSL_Key npc)
|
||||
{
|
||||
return m_OSSL_Functions.osIsNpc(npc);
|
||||
|
|
Loading…
Reference in New Issue