mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Implement osForceBreakAllLinks().
Identical to llBreakAllLinks() except that it doesn't require the script to have link permissions.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user