mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
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.
This commit is contained in:
@@ -376,6 +376,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public event ParcelPrimCountTainted OnParcelPrimCountTainted;
|
||||
public event GetScriptRunning OnGetScriptRunning;
|
||||
|
||||
public delegate void ThrottleUpdate(ScenePresence scenePresence);
|
||||
|
||||
public event ThrottleUpdate OnThrottleUpdate;
|
||||
|
||||
/// <summary>
|
||||
/// RegisterCapsEvent is called by Scene after the Caps object
|
||||
/// has been instantiated and before it is return to the
|
||||
@@ -2641,5 +2645,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerThrottleUpdate(ScenePresence scenePresence)
|
||||
{
|
||||
ThrottleUpdate handler = OnThrottleUpdate;
|
||||
if (handler != null)
|
||||
{
|
||||
handler(scenePresence);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -793,6 +793,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
ControllingClient.OnChangeAnim += avnHandleChangeAnim;
|
||||
ControllingClient.OnForceReleaseControls += HandleForceReleaseControls;
|
||||
ControllingClient.OnAutoPilotGo += MoveToTarget;
|
||||
ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles;
|
||||
|
||||
// ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
|
||||
// ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
|
||||
@@ -3166,6 +3167,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
|
||||
private static Vector3 marker = new Vector3(-1f, -1f, -1f);
|
||||
private void RaiseUpdateThrottles()
|
||||
{
|
||||
m_scene.EventManager.TriggerThrottleUpdate(this);
|
||||
}
|
||||
/// <summary>
|
||||
/// This updates important decision making data about a child agent
|
||||
/// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region
|
||||
|
||||
Reference in New Issue
Block a user