aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 4c49b71..8691b91 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -90,6 +90,10 @@ namespace OpenSim.Region.Framework.Scenes
90 /// </remarks> 90 /// </remarks>
91 public event OnTerrainTickDelegate OnTerrainTick; 91 public event OnTerrainTickDelegate OnTerrainTick;
92 92
93 public delegate void OnTerrainUpdateDelegate();
94
95 public event OnTerrainUpdateDelegate OnTerrainUpdate;
96
93 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); 97 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup);
94 98
95 /// <summary> 99 /// <summary>
@@ -1393,6 +1397,26 @@ namespace OpenSim.Region.Framework.Scenes
1393 } 1397 }
1394 } 1398 }
1395 } 1399 }
1400 public void TriggerTerrainUpdate()
1401 {
1402 OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
1403 if (handlerTerrainUpdate != null)
1404 {
1405 foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
1406 {
1407 try
1408 {
1409 d();
1410 }
1411 catch (Exception e)
1412 {
1413 m_log.ErrorFormat(
1414 "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
1415 e.Message, e.StackTrace);
1416 }
1417 }
1418 }
1419 }
1396 1420
1397 public void TriggerTerrainTick() 1421 public void TriggerTerrainTick()
1398 { 1422 {
@@ -1683,6 +1707,7 @@ namespace OpenSim.Region.Framework.Scenes
1683 m_log.ErrorFormat( 1707 m_log.ErrorFormat(
1684 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1708 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1685 e.Message, e.StackTrace); 1709 e.Message, e.StackTrace);
1710 m_log.ErrorFormat(Environment.StackTrace);
1686 } 1711 }
1687 } 1712 }
1688 } 1713 }
@@ -2922,6 +2947,7 @@ namespace OpenSim.Region.Framework.Scenes
2922 { 2947 {
2923 foreach (Action<Scene> d in handler.GetInvocationList()) 2948 foreach (Action<Scene> d in handler.GetInvocationList())
2924 { 2949 {
2950 m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString());
2925 try 2951 try
2926 { 2952 {
2927 d(s); 2953 d(s);
@@ -2934,6 +2960,7 @@ namespace OpenSim.Region.Framework.Scenes
2934 } 2960 }
2935 } 2961 }
2936 } 2962 }
2963 m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done");
2937 } 2964 }
2938 2965
2939 public void TriggerOnRegionStarted(Scene scene) 2966 public void TriggerOnRegionStarted(Scene scene)