diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index fd62535..e04317b 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -111,6 +111,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
111 | 111 | ||
112 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 112 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
113 | 113 | ||
114 | public delegate void SceneShuttingDownDelegate(Scene scene); | ||
115 | |||
116 | public event SceneShuttingDownDelegate OnSceneShuttingDown; | ||
117 | |||
114 | /// <summary> | 118 | /// <summary> |
115 | /// Fired when an object is touched/grabbed. | 119 | /// Fired when an object is touched/grabbed. |
116 | /// </summary> | 120 | /// </summary> |
@@ -2193,5 +2197,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2193 | } | 2197 | } |
2194 | } | 2198 | } |
2195 | } | 2199 | } |
2200 | |||
2201 | public void TriggerSceneShuttingDown(Scene s) | ||
2202 | { | ||
2203 | SceneShuttingDownDelegate handler = OnSceneShuttingDown; | ||
2204 | if (handler != null) | ||
2205 | { | ||
2206 | foreach (SceneShuttingDownDelegate d in handler.GetInvocationList()) | ||
2207 | { | ||
2208 | try | ||
2209 | { | ||
2210 | d(s); | ||
2211 | } | ||
2212 | catch (Exception e) | ||
2213 | { | ||
2214 | m_log.ErrorFormat( | ||
2215 | "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", | ||
2216 | e.Message, e.StackTrace); | ||
2217 | } | ||
2218 | } | ||
2219 | } | ||
2220 | } | ||
2196 | } | 2221 | } |
2197 | } | 2222 | } |