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 0ae3146..52e6e92 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(IRegionDataStore datastore, bool forceBackup); | 64 | public delegate void OnBackupDelegate(IRegionDataStore datastore, bool forceBackup); |
61 | 65 | ||
62 | public event OnBackupDelegate OnBackup; | 66 | public event OnBackupDelegate OnBackup; |
@@ -744,6 +748,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
744 | } | 748 | } |
745 | } | 749 | } |
746 | } | 750 | } |
751 | public void TriggerTerrainUpdate() | ||
752 | { | ||
753 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
754 | if (handlerTerrainUpdate != null) | ||
755 | { | ||
756 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
757 | { | ||
758 | try | ||
759 | { | ||
760 | d(); | ||
761 | } | ||
762 | catch (Exception e) | ||
763 | { | ||
764 | m_log.ErrorFormat( | ||
765 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
766 | e.Message, e.StackTrace); | ||
767 | } | ||
768 | } | ||
769 | } | ||
770 | } | ||
747 | 771 | ||
748 | public void TriggerTerrainTick() | 772 | public void TriggerTerrainTick() |
749 | { | 773 | { |