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 620b605..418904f 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; |
@@ -906,6 +910,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
906 | } | 910 | } |
907 | } | 911 | } |
908 | } | 912 | } |
913 | public void TriggerTerrainUpdate() | ||
914 | { | ||
915 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
916 | if (handlerTerrainUpdate != null) | ||
917 | { | ||
918 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
919 | { | ||
920 | try | ||
921 | { | ||
922 | d(); | ||
923 | } | ||
924 | catch (Exception e) | ||
925 | { | ||
926 | m_log.ErrorFormat( | ||
927 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
928 | e.Message, e.StackTrace); | ||
929 | } | ||
930 | } | ||
931 | } | ||
932 | } | ||
909 | 933 | ||
910 | public void TriggerTerrainTick() | 934 | public void TriggerTerrainTick() |
911 | { | 935 | { |
@@ -1196,6 +1220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1196 | m_log.ErrorFormat( | 1220 | m_log.ErrorFormat( |
1197 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", | 1221 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", |
1198 | e.Message, e.StackTrace); | 1222 | e.Message, e.StackTrace); |
1223 | m_log.ErrorFormat(Environment.StackTrace); | ||
1199 | } | 1224 | } |
1200 | } | 1225 | } |
1201 | } | 1226 | } |