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.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index fd35c62..74d9e60 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -55,8 +55,12 @@ namespace OpenSim.Region.Framework.Scenes
55 55
56 public delegate void OnTerrainTickDelegate(); 56 public delegate void OnTerrainTickDelegate();
57 57
58 public delegate void OnTerrainUpdateDelegate();
59
58 public event OnTerrainTickDelegate OnTerrainTick; 60 public event OnTerrainTickDelegate OnTerrainTick;
59 61
62 public event OnTerrainUpdateDelegate OnTerrainUpdate;
63
60 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); 64 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup);
61 65
62 public event OnBackupDelegate OnBackup; 66 public event OnBackupDelegate OnBackup;
@@ -791,6 +795,26 @@ namespace OpenSim.Region.Framework.Scenes
791 } 795 }
792 } 796 }
793 } 797 }
798 public void TriggerTerrainUpdate()
799 {
800 OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
801 if (handlerTerrainUpdate != null)
802 {
803 foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
804 {
805 try
806 {
807 d();
808 }
809 catch (Exception e)
810 {
811 m_log.ErrorFormat(
812 "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
813 e.Message, e.StackTrace);
814 }
815 }
816 }
817 }
794 818
795 public void TriggerTerrainTick() 819 public void TriggerTerrainTick()
796 { 820 {