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 4d65be9..eee5960 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -59,8 +59,12 @@ namespace OpenSim.Region.Framework.Scenes
59 59
60 public delegate void OnTerrainTickDelegate(); 60 public delegate void OnTerrainTickDelegate();
61 61
62 public delegate void OnTerrainUpdateDelegate();
63
62 public event OnTerrainTickDelegate OnTerrainTick; 64 public event OnTerrainTickDelegate OnTerrainTick;
63 65
66 public event OnTerrainUpdateDelegate OnTerrainUpdate;
67
64 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); 68 public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup);
65 69
66 public event OnBackupDelegate OnBackup; 70 public event OnBackupDelegate OnBackup;
@@ -908,6 +912,26 @@ namespace OpenSim.Region.Framework.Scenes
908 } 912 }
909 } 913 }
910 } 914 }
915 public void TriggerTerrainUpdate()
916 {
917 OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate;
918 if (handlerTerrainUpdate != null)
919 {
920 foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList())
921 {
922 try
923 {
924 d();
925 }
926 catch (Exception e)
927 {
928 m_log.ErrorFormat(
929 "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}",
930 e.Message, e.StackTrace);
931 }
932 }
933 }
934 }
911 935
912 public void TriggerTerrainTick() 936 public void TriggerTerrainTick()
913 { 937 {
@@ -1198,6 +1222,7 @@ namespace OpenSim.Region.Framework.Scenes
1198 m_log.ErrorFormat( 1222 m_log.ErrorFormat(
1199 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", 1223 "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}",
1200 e.Message, e.StackTrace); 1224 e.Message, e.StackTrace);
1225 m_log.ErrorFormat(Environment.StackTrace);
1201 } 1226 }
1202 } 1227 }
1203 } 1228 }