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.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index e1c9c8e..e257b57 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>
@@ -1035,6 +1039,26 @@ namespace OpenSim.Region.Framework.Scenes
1035 } 1039 }
1036 } 1040 }
1037 } 1041 }
1042 public void TriggerTerrainUpdate()
1043 {
1044 OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
1045 if (handlerTerrainUpdate != null)
1046 {
1047 foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
1048 {
1049 try
1050 {
1051 d();
1052 }
1053 catch (Exception e)
1054 {
1055 m_log.ErrorFormat(
1056 "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
1057 e.Message, e.StackTrace);
1058 }
1059 }
1060 }
1061 }
1038 1062
1039 public void TriggerTerrainTick() 1063 public void TriggerTerrainTick()
1040 { 1064 {
@@ -1325,6 +1349,7 @@ namespace OpenSim.Region.Framework.Scenes
1325 m_log.ErrorFormat( 1349 m_log.ErrorFormat(
1326 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1350 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1327 e.Message, e.StackTrace); 1351 e.Message, e.StackTrace);
1352 m_log.ErrorFormat(Environment.StackTrace);
1328 } 1353 }
1329 } 1354 }
1330 } 1355 }