diff options
author | Dan Lake | 2012-01-19 03:06:35 -0800 |
---|---|---|
committer | Dan Lake | 2012-01-19 03:06:35 -0800 |
commit | e41f23dead25356eb3e4bd37a5ef84c73e07336f (patch) | |
tree | f8d88cb4307ea6ac6713c8a6bf6c919fffbb8ae8 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Cleaned up Color and Text parameters in SOP and made LocalFlags public for mo... (diff) | |
download | opensim-SC-e41f23dead25356eb3e4bd37a5ef84c73e07336f.zip opensim-SC-e41f23dead25356eb3e4bd37a5ef84c73e07336f.tar.gz opensim-SC-e41f23dead25356eb3e4bd37a5ef84c73e07336f.tar.bz2 opensim-SC-e41f23dead25356eb3e4bd37a5ef84c73e07336f.tar.xz |
Trigger event when prims are scheduled for an update. This gives modules early access to changed parameters.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index fd35c62..3d96f40 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -398,6 +398,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
398 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; | 398 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; |
399 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); | 399 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
400 | 400 | ||
401 | public delegate void SceneObjectPartUpdated(SceneObjectPart sop); | ||
402 | public event SceneObjectPartUpdated OnSceneObjectPartUpdated; | ||
403 | |||
401 | public delegate void RegionUp(GridRegion region); | 404 | public delegate void RegionUp(GridRegion region); |
402 | public event RegionUp OnRegionUp; | 405 | public event RegionUp OnRegionUp; |
403 | 406 | ||
@@ -2203,6 +2206,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2203 | } | 2206 | } |
2204 | } | 2207 | } |
2205 | 2208 | ||
2209 | public void TriggerSceneObjectPartUpdated(SceneObjectPart sop) | ||
2210 | { | ||
2211 | SceneObjectPartUpdated handler = OnSceneObjectPartUpdated; | ||
2212 | if (handler != null) | ||
2213 | { | ||
2214 | foreach (SceneObjectPartUpdated d in handler.GetInvocationList()) | ||
2215 | { | ||
2216 | try | ||
2217 | { | ||
2218 | d(sop); | ||
2219 | } | ||
2220 | catch (Exception e) | ||
2221 | { | ||
2222 | m_log.ErrorFormat( | ||
2223 | "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}", | ||
2224 | e.Message, e.StackTrace); | ||
2225 | } | ||
2226 | } | ||
2227 | } | ||
2228 | } | ||
2229 | |||
2206 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, | 2230 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, |
2207 | int local_id, IClientAPI remote_client) | 2231 | int local_id, IClientAPI remote_client) |
2208 | { | 2232 | { |