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 4ce7a6c..d326141 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -115,6 +115,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
115 | 115 | ||
116 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | 116 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; |
117 | 117 | ||
118 | public delegate void SceneShuttingDownDelegate(Scene scene); | ||
119 | |||
120 | public event SceneShuttingDownDelegate OnSceneShuttingDown; | ||
121 | |||
118 | /// <summary> | 122 | /// <summary> |
119 | /// Fired when an object is touched/grabbed. | 123 | /// Fired when an object is touched/grabbed. |
120 | /// </summary> | 124 | /// </summary> |
@@ -2217,5 +2221,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
2217 | } | 2221 | } |
2218 | } | 2222 | } |
2219 | } | 2223 | } |
2224 | |||
2225 | public void TriggerSceneShuttingDown(Scene s) | ||
2226 | { | ||
2227 | SceneShuttingDownDelegate handler = OnSceneShuttingDown; | ||
2228 | if (handler != null) | ||
2229 | { | ||
2230 | foreach (SceneShuttingDownDelegate d in handler.GetInvocationList()) | ||
2231 | { | ||
2232 | try | ||
2233 | { | ||
2234 | d(s); | ||
2235 | } | ||
2236 | catch (Exception e) | ||
2237 | { | ||
2238 | m_log.ErrorFormat( | ||
2239 | "[EVENT MANAGER]: Delegate for TriggerSceneShuttingDown failed - continuing. {0} {1}", | ||
2240 | e.Message, e.StackTrace); | ||
2241 | } | ||
2242 | } | ||
2243 | } | ||
2244 | } | ||
2220 | } | 2245 | } |
2221 | } | 2246 | } |