aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs10
2 files changed, 34 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 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 769824e..b737f91 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -76,6 +76,11 @@ namespace OpenSim.Region.Framework.Scenes
76// { 76// {
77// m_log.Debug("[SCENE PRESENCE] Destructor called"); 77// m_log.Debug("[SCENE PRESENCE] Destructor called");
78// } 78// }
79 private void TriggerScenePresenceUpdated()
80 {
81 if (m_scene != null)
82 m_scene.EventManager.TriggerScenePresenceUpdated(this);
83 }
79 84
80 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 85 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
81 86
@@ -489,6 +494,7 @@ namespace OpenSim.Region.Framework.Scenes
489 //m_log.DebugFormat( 494 //m_log.DebugFormat(
490 // "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}", 495 // "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
491 // Scene.RegionInfo.RegionName, Name, m_pos); 496 // Scene.RegionInfo.RegionName, Name, m_pos);
497 TriggerScenePresenceUpdated();
492 } 498 }
493 } 499 }
494 500
@@ -508,6 +514,7 @@ namespace OpenSim.Region.Framework.Scenes
508 return; 514 return;
509 515
510 m_pos = value; 516 m_pos = value;
517 TriggerScenePresenceUpdated();
511 } 518 }
512 } 519 }
513 520
@@ -1525,6 +1532,7 @@ namespace OpenSim.Region.Framework.Scenes
1525 } 1532 }
1526 1533
1527 m_scene.EventManager.TriggerOnClientMovement(this); 1534 m_scene.EventManager.TriggerOnClientMovement(this);
1535 TriggerScenePresenceUpdated();
1528 } 1536 }
1529 1537
1530 /// <summary> 1538 /// <summary>
@@ -2421,6 +2429,7 @@ namespace OpenSim.Region.Framework.Scenes
2421 2429
2422 m_scene.ForEachClient(SendTerseUpdateToClient); 2430 m_scene.ForEachClient(SendTerseUpdateToClient);
2423 } 2431 }
2432 TriggerScenePresenceUpdated();
2424 } 2433 }
2425 2434
2426 public void SendCoarseLocations(List<Vector3> coarseLocations, List<UUID> avatarUUIDs) 2435 public void SendCoarseLocations(List<Vector3> coarseLocations, List<UUID> avatarUUIDs)
@@ -3197,6 +3206,7 @@ namespace OpenSim.Region.Framework.Scenes
3197 Velocity = force; 3206 Velocity = force;
3198 3207
3199 m_forceToApply = null; 3208 m_forceToApply = null;
3209 TriggerScenePresenceUpdated();
3200 } 3210 }
3201 } 3211 }
3202 3212