diff options
author | Melanie | 2011-03-27 21:22:31 +0100 |
---|---|---|
committer | Melanie | 2011-03-27 21:22:31 +0100 |
commit | f25749f0259bdfe334f77ab049ac5f892135bbc6 (patch) | |
tree | 5fd38027cbe794a1da1d87009f9975d3792f085a /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Don't send a windlight profile to clients if windlight is not set for (diff) | |
parent | Add SignpostMarv to contributors (diff) | |
download | opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.zip opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.gz opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.bz2 opensim-SC-f25749f0259bdfe334f77ab049ac5f892135bbc6.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index c321a15..fd62535 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -242,7 +242,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
242 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); | 242 | public delegate void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID); |
243 | 243 | ||
244 | public event EstateToolsSunUpdate OnEstateToolsSunUpdate; | 244 | public event EstateToolsSunUpdate OnEstateToolsSunUpdate; |
245 | |||
246 | /// <summary> | ||
247 | /// Triggered when an object is added to the scene. | ||
248 | /// </summary> | ||
249 | public event Action<SceneObjectGroup> OnObjectAddedToScene; | ||
245 | 250 | ||
251 | /// <summary> | ||
252 | /// Triggered when an object is removed from the scene. | ||
253 | /// </summary> | ||
246 | public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); | 254 | public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); |
247 | public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; | 255 | public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; |
248 | 256 | ||
@@ -345,6 +353,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
345 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); | 353 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); |
346 | public event Attach OnAttach; | 354 | public event Attach OnAttach; |
347 | 355 | ||
356 | |||
348 | /// <summary> | 357 | /// <summary> |
349 | /// Called immediately after an object is loaded from storage. | 358 | /// Called immediately after an object is loaded from storage. |
350 | /// </summary> | 359 | /// </summary> |
@@ -800,6 +809,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
800 | } | 809 | } |
801 | } | 810 | } |
802 | 811 | ||
812 | public void TriggerObjectAddedToScene(SceneObjectGroup obj) | ||
813 | { | ||
814 | Action<SceneObjectGroup> handler = OnObjectAddedToScene; | ||
815 | if (handler != null) | ||
816 | { | ||
817 | foreach (Action<SceneObjectGroup> d in handler.GetInvocationList()) | ||
818 | { | ||
819 | try | ||
820 | { | ||
821 | d(obj); | ||
822 | } | ||
823 | catch (Exception e) | ||
824 | { | ||
825 | m_log.ErrorFormat( | ||
826 | "[EVENT MANAGER]: Delegate for TriggerObjectAddedToScene failed - continuing. {0} {1}", | ||
827 | e.Message, e.StackTrace); | ||
828 | } | ||
829 | } | ||
830 | } | ||
831 | } | ||
832 | |||
803 | public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj) | 833 | public void TriggerObjectBeingRemovedFromScene(SceneObjectGroup obj) |
804 | { | 834 | { |
805 | ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene; | 835 | ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = OnObjectBeingRemovedFromScene; |