diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 4c49b71..5b1c9f4 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -90,6 +90,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
90 | /// </remarks> | 90 | /// </remarks> |
91 | public event OnTerrainTickDelegate OnTerrainTick; | 91 | public event OnTerrainTickDelegate OnTerrainTick; |
92 | 92 | ||
93 | public delegate void OnTerrainUpdateDelegate(); | ||
94 | |||
95 | public event OnTerrainUpdateDelegate OnTerrainUpdate; | ||
96 | |||
93 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); | 97 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); |
94 | 98 | ||
95 | /// <summary> | 99 | /// <summary> |
@@ -812,6 +816,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
812 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; | 816 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; |
813 | public event GetScriptRunning OnGetScriptRunning; | 817 | public event GetScriptRunning OnGetScriptRunning; |
814 | 818 | ||
819 | public delegate void ThrottleUpdate(ScenePresence scenePresence); | ||
820 | |||
821 | public event ThrottleUpdate OnThrottleUpdate; | ||
822 | |||
815 | /// <summary> | 823 | /// <summary> |
816 | /// RegisterCapsEvent is called by Scene after the Caps object | 824 | /// RegisterCapsEvent is called by Scene after the Caps object |
817 | /// has been instantiated and before it is return to the | 825 | /// has been instantiated and before it is return to the |
@@ -1393,6 +1401,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
1393 | } | 1401 | } |
1394 | } | 1402 | } |
1395 | } | 1403 | } |
1404 | public void TriggerTerrainUpdate() | ||
1405 | { | ||
1406 | OnTerrainUpdateDelegate handlerTerrainUpdate = OnTerrainUpdate; | ||
1407 | if (handlerTerrainUpdate != null) | ||
1408 | { | ||
1409 | foreach (OnTerrainUpdateDelegate d in handlerTerrainUpdate.GetInvocationList()) | ||
1410 | { | ||
1411 | try | ||
1412 | { | ||
1413 | d(); | ||
1414 | } | ||
1415 | catch (Exception e) | ||
1416 | { | ||
1417 | m_log.ErrorFormat( | ||
1418 | "[EVENT MANAGER]: Delegate for TriggerTerrainUpdate failed - continuing. {0} {1}", | ||
1419 | e.Message, e.StackTrace); | ||
1420 | } | ||
1421 | } | ||
1422 | } | ||
1423 | } | ||
1396 | 1424 | ||
1397 | public void TriggerTerrainTick() | 1425 | public void TriggerTerrainTick() |
1398 | { | 1426 | { |
@@ -1683,6 +1711,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1683 | m_log.ErrorFormat( | 1711 | m_log.ErrorFormat( |
1684 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", | 1712 | "[EVENT MANAGER]: Delegate for TriggerRemoveScript failed - continuing. {0} {1}", |
1685 | e.Message, e.StackTrace); | 1713 | e.Message, e.StackTrace); |
1714 | m_log.ErrorFormat(Environment.StackTrace); | ||
1686 | } | 1715 | } |
1687 | } | 1716 | } |
1688 | } | 1717 | } |
@@ -2922,6 +2951,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2922 | { | 2951 | { |
2923 | foreach (Action<Scene> d in handler.GetInvocationList()) | 2952 | foreach (Action<Scene> d in handler.GetInvocationList()) |
2924 | { | 2953 | { |
2954 | m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString()); | ||
2925 | try | 2955 | try |
2926 | { | 2956 | { |
2927 | d(s); | 2957 | d(s); |
@@ -2934,6 +2964,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2934 | } | 2964 | } |
2935 | } | 2965 | } |
2936 | } | 2966 | } |
2967 | m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done"); | ||
2937 | } | 2968 | } |
2938 | 2969 | ||
2939 | public void TriggerOnRegionStarted(Scene scene) | 2970 | public void TriggerOnRegionStarted(Scene scene) |
@@ -3103,5 +3134,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3103 | } | 3134 | } |
3104 | } | 3135 | } |
3105 | } | 3136 | } |
3137 | |||
3138 | public void TriggerThrottleUpdate(ScenePresence scenePresence) | ||
3139 | { | ||
3140 | ThrottleUpdate handler = OnThrottleUpdate; | ||
3141 | if (handler != null) | ||
3142 | { | ||
3143 | handler(scenePresence); | ||
3144 | } | ||
3145 | } | ||
3106 | } | 3146 | } |
3107 | } | 3147 | } |