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 e25fa94..7133817 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>
@@ -1379,6 +1383,26 @@ namespace OpenSim.Region.Framework.Scenes
1379 } 1383 }
1380 } 1384 }
1381 } 1385 }
1386 public void TriggerTerrainUpdate()
1387 {
1388 OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
1389 if (handlerTerrainUpdate != null)
1390 {
1391 foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
1392 {
1393 try
1394 {
1395 d();
1396 }
1397 catch (Exception e)
1398 {
1399 m_log.ErrorFormat(
1400 "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
1401 e.Message, e.StackTrace);
1402 }
1403 }
1404 }
1405 }
1382 1406
1383 public void TriggerTerrainTick() 1407 public void TriggerTerrainTick()
1384 { 1408 {
@@ -1669,6 +1693,7 @@ namespace OpenSim.Region.Framework.Scenes
1669 m_log.ErrorFormat( 1693 m_log.ErrorFormat(
1670 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1694 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1671 e.Message, e.StackTrace); 1695 e.Message, e.StackTrace);
1696 m_log.ErrorFormat(Environment.StackTrace);
1672 } 1697 }
1673 } 1698 }
1674 } 1699 }