diff options
author | Dan Lake | 2012-05-08 16:05:34 -0700 |
---|---|---|
committer | Dan Lake | 2012-05-08 16:05:34 -0700 |
commit | 20952c75c526180a0286fb9634b94ac1354a2770 (patch) | |
tree | b8724d1e7187220e9ab0d3365afb6fe26aa6e50a /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Add automated TestllBreakLink() (diff) | |
download | opensim-SC-20952c75c526180a0286fb9634b94ac1354a2770.zip opensim-SC-20952c75c526180a0286fb9634b94ac1354a2770.tar.gz opensim-SC-20952c75c526180a0286fb9634b94ac1354a2770.tar.bz2 opensim-SC-20952c75c526180a0286fb9634b94ac1354a2770.tar.xz |
Trigger event when scene presences are updated
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-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 b3debb0..ace8313 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -480,6 +480,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
480 | public delegate void SceneObjectPartUpdated(SceneObjectPart sop); | 480 | public delegate void SceneObjectPartUpdated(SceneObjectPart sop); |
481 | public event SceneObjectPartUpdated OnSceneObjectPartUpdated; | 481 | public event SceneObjectPartUpdated OnSceneObjectPartUpdated; |
482 | 482 | ||
483 | public delegate void ScenePresenceUpdated(ScenePresence sp); | ||
484 | public event ScenePresenceUpdated OnScenePresenceUpdated; | ||
485 | |||
483 | public delegate void RegionUp(GridRegion region); | 486 | public delegate void RegionUp(GridRegion region); |
484 | public event RegionUp OnRegionUp; | 487 | public event RegionUp OnRegionUp; |
485 | 488 | ||
@@ -2343,6 +2346,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
2343 | } | 2346 | } |
2344 | } | 2347 | } |
2345 | 2348 | ||
2349 | public void TriggerScenePresenceUpdated(ScenePresence sp) | ||
2350 | { | ||
2351 | ScenePresenceUpdated handler = OnScenePresenceUpdated; | ||
2352 | if (handler != null) | ||
2353 | { | ||
2354 | foreach (ScenePresenceUpdated d in handler.GetInvocationList()) | ||
2355 | { | ||
2356 | try | ||
2357 | { | ||
2358 | d(sp); | ||
2359 | } | ||
2360 | catch (Exception e) | ||
2361 | { | ||
2362 | m_log.ErrorFormat( | ||
2363 | "[EVENT MANAGER]: Delegate for TriggerScenePresenceUpdated failed - continuing. {0} {1}", | ||
2364 | e.Message, e.StackTrace); | ||
2365 | } | ||
2366 | } | ||
2367 | } | ||
2368 | } | ||
2369 | |||
2346 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, | 2370 | public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, |
2347 | int local_id, IClientAPI remote_client) | 2371 | int local_id, IClientAPI remote_client) |
2348 | { | 2372 | { |