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 4a4d98f..547e693 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; |
@@ -788,6 +792,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
788 | } | 792 | } |
789 | } | 793 | } |
790 | } | 794 | } |
795 | public void TriggerTerrainUpdate() | ||
796 | { | ||
797 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
798 | if (handlerTerrainUpdate != null) | ||
799 | { | ||
800 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
801 | { | ||
802 | try | ||
803 | { | ||
804 | d(); | ||
805 | } | ||
806 | catch (Exception e) | ||
807 | { | ||
808 | m_log.ErrorFormat( | ||
809 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
810 | e.Message, e.StackTrace); | ||
811 | } | ||
812 | } | ||
813 | } | ||
814 | } | ||
791 | 815 | ||
792 | public void TriggerTerrainTick() | 816 | public void TriggerTerrainTick() |
793 | { | 817 | { |