aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2013-05-30 09:21:58 -0700
committerRobert Adams2013-05-30 19:16:31 -0700
commit439f11cc3cf2ab8f7fdc1d8746f1d8ab44c911eb (patch)
treed9e9653e013911ec27f66eb293be2402b38c96c7 /OpenSim/Region
parentBulletSim: remove unuseful BulletSim parameters from OpenSimDefaults.ini and (diff)
downloadopensim-SC_OLD-439f11cc3cf2ab8f7fdc1d8746f1d8ab44c911eb.zip
opensim-SC_OLD-439f11cc3cf2ab8f7fdc1d8746f1d8ab44c911eb.tar.gz
opensim-SC_OLD-439f11cc3cf2ab8f7fdc1d8746f1d8ab44c911eb.tar.bz2
opensim-SC_OLD-439f11cc3cf2ab8f7fdc1d8746f1d8ab44c911eb.tar.xz
Add region heartbeat start event to complement heartbeat end event.
This allows object modification before the usual heartbeat operation.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 59d0148..a246319 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -969,6 +969,8 @@ namespace OpenSim.Region.Framework.Scenes
969 public delegate void RegionStarted(Scene scene); 969 public delegate void RegionStarted(Scene scene);
970 public event RegionStarted OnRegionStarted; 970 public event RegionStarted OnRegionStarted;
971 971
972 public delegate void RegionHeartbeatStart(Scene scene);
973 public event RegionHeartbeatStart OnRegionHeartbeatStart;
972 public delegate void RegionHeartbeatEnd(Scene scene); 974 public delegate void RegionHeartbeatEnd(Scene scene);
973 public event RegionHeartbeatEnd OnRegionHeartbeatEnd; 975 public event RegionHeartbeatEnd OnRegionHeartbeatEnd;
974 976
@@ -3068,6 +3070,27 @@ namespace OpenSim.Region.Framework.Scenes
3068 } 3070 }
3069 } 3071 }
3070 3072
3073 public void TriggerRegionHeartbeatStart(Scene scene)
3074 {
3075 RegionHeartbeatStart handler = OnRegionHeartbeatStart;
3076
3077 if (handler != null)
3078 {
3079 foreach (RegionHeartbeatStart d in handler.GetInvocationList())
3080 {
3081 try
3082 {
3083 d(scene);
3084 }
3085 catch (Exception e)
3086 {
3087 m_log.ErrorFormat("[EVENT MANAGER]: Delegate for OnRegionHeartbeatStart failed - continuing {0} - {1}",
3088 e.Message, e.StackTrace);
3089 }
3090 }
3091 }
3092 }
3093
3071 public void TriggerRegionHeartbeatEnd(Scene scene) 3094 public void TriggerRegionHeartbeatEnd(Scene scene)
3072 { 3095 {
3073 RegionHeartbeatEnd handler = OnRegionHeartbeatEnd; 3096 RegionHeartbeatEnd handler = OnRegionHeartbeatEnd;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5dea634..0743ce7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1517,6 +1517,8 @@ namespace OpenSim.Region.Framework.Scenes
1517 1517
1518 try 1518 try
1519 { 1519 {
1520 EventManager.TriggerRegionHeartbeatStart(this);
1521
1520 // Apply taints in terrain module to terrain in physics scene 1522 // Apply taints in terrain module to terrain in physics scene
1521 if (Frame % m_update_terrain == 0) 1523 if (Frame % m_update_terrain == 0)
1522 { 1524 {