A few updates necessary for load balancer.

- handle GetUser request for nonexistent user gracefully
- include throttle levels in ClientInfo
- code to save/restore throttles in client stack
- only update/send updates to active clients
- make animation classes serializable
This commit is contained in:
Mike Mazur
2009-02-25 00:32:26 +00:00
parent d81fb565c1
commit bdf95e54a2
9 changed files with 98 additions and 49 deletions

View File

@@ -25,11 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Region.Framework.Scenes
{
[Serializable]
public class Animation
{
private UUID animID;

View File

@@ -25,11 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenSim.Region.Framework.Scenes
{
[Serializable]
public class AnimationSet
{
public static AvatarAnimations Animations = new AvatarAnimations();

View File

@@ -2048,17 +2048,22 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="remoteClient"></param>
public void SendTerseUpdateToClient(IClientAPI remoteClient)
{
m_perfMonMS = System.Environment.TickCount;
// If the client is inactive, it's getting its updates from another
// server.
if (remoteClient.IsActive)
{
m_perfMonMS = System.Environment.TickCount;
Vector3 pos = m_pos;
Vector3 vel = Velocity;
Quaternion rot = m_bodyRot;
pos.Z -= m_appearance.HipOffset;
remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
new Vector3(vel.X, vel.Y, vel.Z), rot);
Vector3 pos = m_pos;
Vector3 vel = Velocity;
Quaternion rot = m_bodyRot;
pos.Z -= m_appearance.HipOffset;
remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * (float)ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z),
new Vector3(vel.X, vel.Y, vel.Z), rot);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
m_scene.AddAgentUpdates(1);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
m_scene.AddAgentUpdates(1);
}
}
/// <summary>