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 4c49b71..e2414eb 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 }