diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1a672e85b8..8b30b58096 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -1818,8 +1818,19 @@ namespace OpenSim.Region.Environment.Scenes } } + /// + /// Delete all the parts in this group. + /// public void DeleteParts() { + lock (m_parts) + { + foreach (SceneObjectPart part in m_parts.Values) + { + part.StopScripts(); + } + } + m_rootPart = null; m_parts.Clear(); } diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index deeb0ad38d..f7e82a5c26 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -126,6 +126,9 @@ namespace OpenSim.Region.Environment.Scenes } } + /// + /// Stop all the scripts in this prim. + /// public void StopScripts() { lock (m_taskInventory)