Implement osForceBreakAllLinks().

Identical to llBreakAllLinks() except that it doesn't require the script to have link permissions.
This commit is contained in:
Justin Clark-Casey (justincc)
2014-03-13 00:04:20 +00:00
parent 6a279feb2f
commit 873eee5431
4 changed files with 25 additions and 0 deletions

View File

@@ -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

View File

@@ -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");