aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs22
2 files changed, 36 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 3d96f40..d31d380 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -407,6 +407,9 @@ namespace OpenSim.Region.Framework.Scenes
407 public delegate void RegionStarted(Scene scene); 407 public delegate void RegionStarted(Scene scene);
408 public event RegionStarted OnRegionStarted; 408 public event RegionStarted OnRegionStarted;
409 409
410 public delegate void RegionHeartbeatEnd(Scene scene);
411 public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
412
410 public delegate void LoginsEnabled(string regionName); 413 public delegate void LoginsEnabled(string regionName);
411 public event LoginsEnabled OnLoginsEnabled; 414 public event LoginsEnabled OnLoginsEnabled;
412 415
@@ -2291,6 +2294,27 @@ namespace OpenSim.Region.Framework.Scenes
2291 } 2294 }
2292 } 2295 }
2293 2296
2297 public void TriggerRegionHeartbeatEnd(Scene scene)
2298 {
2299 RegionHeartbeatEnd handler = OnRegionHeartbeatEnd;
2300
2301 if (handler != null)
2302 {
2303 foreach (RegionHeartbeatEnd d in handler.GetInvocationList())
2304 {
2305 try
2306 {
2307 d(scene);
2308 }
2309 catch (Exception e)
2310 {
2311 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatEnd failed - continuing {0} - {1}",
2312 e.Message, e.StackTrace);
2313 }
2314 }
2315 }
2316 }
2317
2294 public void TriggerLoginsEnabled (string regionName) 2318 public void TriggerLoginsEnabled (string regionName)
2295 { 2319 {
2296 LoginsEnabled handler = OnLoginsEnabled; 2320 LoginsEnabled handler = OnLoginsEnabled;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index bfe8d2c..bbd2163 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1385,6 +1385,8 @@ namespace OpenSim.Region.Framework.Scenes
1385 RegionInfo.RegionName, e.Message, e.StackTrace); 1385 RegionInfo.RegionName, e.Message, e.StackTrace);
1386 } 1386 }
1387 1387
1388 EventManager.TriggerRegionHeartbeatEnd(this);
1389
1388 maintc = Util.EnvironmentTickCountSubtract(maintc); 1390 maintc = Util.EnvironmentTickCountSubtract(maintc);
1389 maintc = (int)(MinFrameTime * 1000) - maintc; 1391 maintc = (int)(MinFrameTime * 1000) - maintc;
1390 1392
@@ -4290,16 +4292,16 @@ namespace OpenSim.Region.Framework.Scenes
4290 public SceneObjectGroup GetGroupByPrim(uint localID) 4292 public SceneObjectGroup GetGroupByPrim(uint localID)
4291 { 4293 {
4292 return m_sceneGraph.GetGroupByPrim(localID); 4294 return m_sceneGraph.GetGroupByPrim(localID);
4293 } 4295 }
4294 4296
4295 /// <summary> 4297 /// <summary>
4296 /// Get a scene object group that contains the prim with the given uuid 4298 /// Get a scene object group that contains the prim with the given uuid
4297 /// </summary> 4299 /// </summary>
4298 /// <param name="fullID"></param> 4300 /// <param name="fullID"></param>
4299 /// <returns>null if no scene object group containing that prim is found</returns> 4301 /// <returns>null if no scene object group containing that prim is found</returns>
4300 public SceneObjectGroup GetGroupByPrim(UUID fullID) 4302 public SceneObjectGroup GetGroupByPrim(UUID fullID)
4301 { 4303 {
4302 return m_sceneGraph.GetGroupByPrim(fullID); 4304 return m_sceneGraph.GetGroupByPrim(fullID);
4303 } 4305 }
4304 4306
4305 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) 4307 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)