diff options
author | teravus | 2012-11-04 22:57:24 -0500 |
---|---|---|
committer | teravus | 2012-11-04 22:57:24 -0500 |
commit | 4fa088bafb4c78ad3177b0e944a4312bd6abdea7 (patch) | |
tree | d6ff3e82c2e5502fc57eec819dc9e97752030c27 /OpenSim/Region/Framework/Scenes | |
parent | Prevent IMs being sent to prims when avies decline inventory offers from them. (diff) | |
download | opensim-SC-4fa088bafb4c78ad3177b0e944a4312bd6abdea7.zip opensim-SC-4fa088bafb4c78ad3177b0e944a4312bd6abdea7.tar.gz opensim-SC-4fa088bafb4c78ad3177b0e944a4312bd6abdea7.tar.bz2 opensim-SC-4fa088bafb4c78ad3177b0e944a4312bd6abdea7.tar.xz |
Pipe Throttle Update Event to EventManager, client --> ScenePresence --> EventManager, so that modules can know when throttles are updated. The event contains no client specific data to preserve the possibility of 'multiple clients' and you must still call ControllingClient.GetThrottlesPacked(f) to see what the throttles actually are once the event fires. Hook EventManager.OnUpdateThrottle to GetTextureModule.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 7916c42..4a19c3b 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -376,6 +376,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
376 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; | 376 | public event ParcelPrimCountTainted OnParcelPrimCountTainted; |
377 | public event GetScriptRunning OnGetScriptRunning; | 377 | public event GetScriptRunning OnGetScriptRunning; |
378 | 378 | ||
379 | public delegate void ThrottleUpdate(ScenePresence scenePresence); | ||
380 | |||
381 | public event ThrottleUpdate OnThrottleUpdate; | ||
382 | |||
379 | /// <summary> | 383 | /// <summary> |
380 | /// RegisterCapsEvent is called by Scene after the Caps object | 384 | /// RegisterCapsEvent is called by Scene after the Caps object |
381 | /// has been instantiated and before it is return to the | 385 | /// has been instantiated and before it is return to the |
@@ -2641,5 +2645,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2641 | } | 2645 | } |
2642 | } | 2646 | } |
2643 | } | 2647 | } |
2648 | |||
2649 | public void TriggerThrottleUpdate(ScenePresence scenePresence) | ||
2650 | { | ||
2651 | ThrottleUpdate handler = OnThrottleUpdate; | ||
2652 | if (handler != null) | ||
2653 | { | ||
2654 | handler(scenePresence); | ||
2655 | } | ||
2656 | } | ||
2644 | } | 2657 | } |
2645 | } | 2658 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a8aa551..2b9665c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -793,6 +793,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
793 | ControllingClient.OnChangeAnim += avnHandleChangeAnim; | 793 | ControllingClient.OnChangeAnim += avnHandleChangeAnim; |
794 | ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; | 794 | ControllingClient.OnForceReleaseControls += HandleForceReleaseControls; |
795 | ControllingClient.OnAutoPilotGo += MoveToTarget; | 795 | ControllingClient.OnAutoPilotGo += MoveToTarget; |
796 | ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; | ||
796 | 797 | ||
797 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 798 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
798 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 799 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
@@ -3166,6 +3167,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3166 | } | 3167 | } |
3167 | 3168 | ||
3168 | private static Vector3 marker = new Vector3(-1f, -1f, -1f); | 3169 | private static Vector3 marker = new Vector3(-1f, -1f, -1f); |
3170 | private void RaiseUpdateThrottles() | ||
3171 | { | ||
3172 | m_scene.EventManager.TriggerThrottleUpdate(this); | ||
3173 | } | ||
3169 | /// <summary> | 3174 | /// <summary> |
3170 | /// This updates important decision making data about a child agent | 3175 | /// This updates important decision making data about a child agent |
3171 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region | 3176 | /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region |