* Stop (which currently removes) all scripts in an object when that object is deleted from the region

0.6.0-stable
Justin Clarke Casey 2008-03-18 20:11:35 +00:00
parent 78e24380c8
commit f77ab46184
2 changed files with 14 additions and 0 deletions

View File

@ -1818,8 +1818,19 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
/// <summary>
/// Delete all the parts in this group.
/// </summary>
public void DeleteParts() public void DeleteParts()
{ {
lock (m_parts)
{
foreach (SceneObjectPart part in m_parts.Values)
{
part.StopScripts();
}
}
m_rootPart = null; m_rootPart = null;
m_parts.Clear(); m_parts.Clear();
} }

View File

@ -126,6 +126,9 @@ namespace OpenSim.Region.Environment.Scenes
} }
} }
/// <summary>
/// Stop all the scripts in this prim.
/// </summary>
public void StopScripts() public void StopScripts()
{ {
lock (m_taskInventory) lock (m_taskInventory)