aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 09480f6..357ee32 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -142,6 +142,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
142 get { return m_ScriptConfig; } 142 get { return m_ScriptConfig; }
143 } 143 }
144 144
145 public event ScriptRemoved OnScriptRemoved;
146 public event ObjectRemoved OnObjectRemoved;
147
145 // 148 //
146 // IRegionModule functions 149 // IRegionModule functions
147 // 150 //
@@ -702,6 +705,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
702 if (part != null) 705 if (part != null)
703 part.RemoveScriptEvents(itemID); 706 part.RemoveScriptEvents(itemID);
704 707
708 bool objectRemoved = false;
709
705 lock (m_PrimObjects) 710 lock (m_PrimObjects)
706 { 711 {
707 // Remove the script from it's prim 712 // Remove the script from it's prim
@@ -715,6 +720,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
715 if (m_PrimObjects[localID].Count == 0) 720 if (m_PrimObjects[localID].Count == 0)
716 { 721 {
717 m_PrimObjects.Remove(localID); 722 m_PrimObjects.Remove(localID);
723 objectRemoved = true;
718 } 724 }
719 } 725 }
720 } 726 }
@@ -731,8 +737,16 @@ namespace OpenSim.Region.ScriptEngine.XEngine
731 737
732 instance = null; 738 instance = null;
733 739
740 ObjectRemoved handlerObjectRemoved = OnObjectRemoved;
741 if (handlerObjectRemoved != null)
742 handlerObjectRemoved(part.UUID);
743
734 CleanAssemblies(); 744 CleanAssemblies();
735 } 745 }
746
747 ScriptRemoved handlerScriptRemoved = OnScriptRemoved;
748 if (handlerScriptRemoved != null)
749 handlerScriptRemoved(itemID);
736 } 750 }
737 751
738 public void OnScriptReset(uint localID, UUID itemID) 752 public void OnScriptReset(uint localID, UUID itemID)