mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user