From bdf95e54a2da5b60e7817d748f7389289a59bc5e Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Wed, 25 Feb 2009 00:32:26 +0000
Subject: 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
---
OpenSim/Region/Framework/Scenes/Animation.cs | 2 ++
OpenSim/Region/Framework/Scenes/AnimationSet.cs | 2 ++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 ++++++++++++++---------
3 files changed, 18 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
diff --git a/OpenSim/Region/Framework/Scenes/Animation.cs b/OpenSim/Region/Framework/Scenes/Animation.cs
index 7c3e010..1e697bd 100644
--- a/OpenSim/Region/Framework/Scenes/Animation.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation.cs
@@ -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;
diff --git a/OpenSim/Region/Framework/Scenes/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/AnimationSet.cs
index ab65166..8e25954 100644
--- a/OpenSim/Region/Framework/Scenes/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/AnimationSet.cs
@@ -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();
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6fade39..db0a2d2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2048,17 +2048,22 @@ namespace OpenSim.Region.Framework.Scenes
///
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);
+ }
}
///
--
cgit v1.1