diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index b3debb0..2365cfe 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; |
@@ -889,6 +893,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
889 | } | 893 | } |
890 | } | 894 | } |
891 | } | 895 | } |
896 | public void TriggerTerrainUpdate() | ||
897 | { | ||
898 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
899 | if (handlerTerrainUpdate != null) | ||
900 | { | ||
901 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
902 | { | ||
903 | try | ||
904 | { | ||
905 | d(); | ||
906 | } | ||
907 | catch (Exception e) | ||
908 | { | ||
909 | m_log.ErrorFormat( | ||
910 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
911 | e.Message, e.StackTrace); | ||
912 | } | ||
913 | } | ||
914 | } | ||
915 | } | ||
892 | 916 | ||
893 | public void TriggerTerrainTick() | 917 | public void TriggerTerrainTick() |
894 | { | 918 | { |