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 6b08e0f..ac5f433 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 | } |
@@ -2919,6 +2948,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2919 | { | 2948 | { |
2920 | foreach (Action<Scene> d in handler.GetInvocationList()) | 2949 | foreach (Action<Scene> d in handler.GetInvocationList()) |
2921 | { | 2950 | { |
2951 | m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString()); | ||
2922 | try | 2952 | try |
2923 | { | 2953 | { |
2924 | d(s); | 2954 | d(s); |
@@ -2931,6 +2961,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2931 | } | 2961 | } |
2932 | } | 2962 | } |
2933 | } | 2963 | } |
2964 | m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done"); | ||
2934 | } | 2965 | } |
2935 | 2966 | ||
2936 | public void TriggerOnRegionStarted(Scene scene) | 2967 | public void TriggerOnRegionStarted(Scene scene) |
@@ -3100,5 +3131,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3100 | } | 3131 | } |
3101 | } | 3132 | } |
3102 | } | 3133 | } |
3134 | |||
3135 | public void TriggerThrottleUpdate(ScenePresence scenePresence) | ||
3136 | { | ||
3137 | ThrottleUpdate handler = OnThrottleUpdate; | ||
3138 | if (handler != null) | ||
3139 | { | ||
3140 | handler(scenePresence); | ||
3141 | } | ||
3142 | } | ||
3103 | } | 3143 | } |
3104 | } | 3144 | } |