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 f97b0a9..7688cf8 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; |
@@ -896,6 +900,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
896 | } | 900 | } |
897 | } | 901 | } |
898 | } | 902 | } |
903 | public void TriggerTerrainUpdate() | ||
904 | { | ||
905 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
906 | if (handlerTerrainUpdate != null) | ||
907 | { | ||
908 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
909 | { | ||
910 | try | ||
911 | { | ||
912 | d(); | ||
913 | } | ||
914 | catch (Exception e) | ||
915 | { | ||
916 | m_log.ErrorFormat( | ||
917 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
918 | e.Message, e.StackTrace); | ||
919 | } | ||
920 | } | ||
921 | } | ||
922 | } | ||
899 | 923 | ||
900 | public void TriggerTerrainTick() | 924 | public void TriggerTerrainTick() |
901 | { | 925 | { |