From f77ab461846410297489c07b7c5029b099e119f3 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 18 Mar 2008 20:11:35 +0000 Subject: * Stop (which currently removes) all scripts in an object when that object is deleted from the region --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 11 +++++++++++ .../Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 3 +++ 2 files changed, 14 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1a672e8..8b30b58 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 deeb0ad..f7e82a5 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) -- cgit v1.1