diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 6dea2f0..7cb3811 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; |
@@ -905,6 +909,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
905 | } | 909 | } |
906 | } | 910 | } |
907 | } | 911 | } |
912 | public void TriggerTerrainUpdate() | ||
913 | { | ||
914 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
915 | if (handlerTerrainUpdate != null) | ||
916 | { | ||
917 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
918 | { | ||
919 | try | ||
920 | { | ||
921 | d(); | ||
922 | } | ||
923 | catch (Exception e) | ||
924 | { | ||
925 | m_log.ErrorFormat( | ||
926 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
927 | e.Message, e.StackTrace); | ||
928 | } | ||
929 | } | ||
930 | } | ||
931 | } | ||
908 | 932 | ||
909 | public void TriggerTerrainTick() | 933 | public void TriggerTerrainTick() |
910 | { | 934 | { |
@@ -1195,6 +1219,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1195 | m_log.ErrorFormat( | 1219 | m_log.ErrorFormat( |
1196 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", | 1220 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", |
1197 | e.Message, e.StackTrace); | 1221 | e.Message, e.StackTrace); |
1222 | m_log.ErrorFormat(Environment.StackTrace); | ||
1198 | } | 1223 | } |
1199 | } | 1224 | } |
1200 | } | 1225 | } |