From 8c657e48377213e7ee66c05a4047085cee6084ea Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 14 Aug 2014 20:41:36 +0100 Subject: add a estimator of client ping time, and painfully make it visible in show connections console command --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 59d1c69..e69bf23 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -419,6 +419,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } + public int PingTimeMS + { + get + { + if (UDPClient != null) + return UDPClient.PingTimeMS; + return 0; + } + } + /// /// Entity update queues /// @@ -461,6 +471,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP set { m_disableFacelights = value; } } + public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } @@ -1638,6 +1649,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP pc.PingID.OldestUnacked = 0; OutPacket(pc, ThrottleOutPacketType.Unknown); + UDPClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); } public void SendKillObject(List localIDs) -- cgit v1.1 From 1edaf29149c767a2742b44d69308edb2e2d64428 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 16 Aug 2014 13:43:26 +0100 Subject: NextAnimationSequenceNumber be a udpserver variable with random start --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e69bf23..6f41ac8 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -358,7 +358,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // protected HashSet m_attachmentsSent; private bool m_deliverPackets = true; - private int m_animationSequenceNumber = 1; + private bool m_SendLogoutPacketWhenClosing = true; /// @@ -450,7 +450,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string Name { get { return FirstName + " " + LastName; } } public uint CircuitCode { get { return m_circuitCode; } } - public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } + public int NextAnimationSequenceNumber + { + get { return m_udpServer.NextAnimationSequenceNumber; } + } /// /// As well as it's function in IClientAPI, in LLClientView we are locking on this property in order to -- cgit v1.1 From 4c46ebdbf501733e1b9d7e23943da095c4f60bce Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 03:47:26 +0100 Subject: fix a missed blocking of sending updates the the new attach points above hud indexes --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6f41ac8..8f69b3e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3828,8 +3828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { SceneObjectPart e = (SceneObjectPart)entity; SceneObjectGroup g = e.ParentGroup; - if (g.RootPart.Shape.State > 30 && g.RootPart.Shape.State < 39) // HUD - if (g.OwnerID != AgentId) + if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) return; // Don't send updates for other people's HUDs } -- cgit v1.1 From 505cbf9983ffd70d473299e517bf792f3f04d46d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 03:58:16 +0100 Subject: still another ... --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8f69b3e..608b739 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3946,8 +3946,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (part.ParentGroup.IsAttachment) { // Someone else's HUD, why are we getting these? - if (part.ParentGroup.OwnerID != AgentId && - part.ParentGroup.RootPart.Shape.State > 30 && part.ParentGroup.RootPart.Shape.State < 39) + if (part.ParentGroup.OwnerID != AgentId && part.ParentGroup.HasPrivateAttachmentPoint) continue; ScenePresence sp; // Owner is not in the sim, don't update it to -- cgit v1.1 From 8f0d35e59a77ec44c7ee55296a02882b424b469f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 09:04:20 +0100 Subject: fix the encoding of rotation in updates, not just using the next field to override w bytes. ( specially having it commented ) --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 608b739..6eb0c5e 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5291,16 +5291,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP byte[] objectData = new byte[76]; + Vector3 velocity = data.Velocity; + Vector3 acceleration = new Vector3(0, 0, 0); + rotation.Normalize(); + Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); + data.CollisionPlane.ToBytes(objectData, 0); offsetPosition.ToBytes(objectData, 16); - Vector3 velocity = new Vector3(0, 0, 0); - Vector3 acceleration = new Vector3(0, 0, 0); velocity.ToBytes(objectData, 28); acceleration.ToBytes(objectData, 40); -// data.Velocity.ToBytes(objectData, 28); -// data.Acceleration.ToBytes(objectData, 40); - rotation.ToBytes(objectData, 52); - //data.AngularVelocity.ToBytes(objectData, 64); + vrot.ToBytes(objectData, 52); + data.AngularVelocity.ToBytes(objectData, 64); ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); @@ -5356,15 +5357,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP data.RelativePosition.ToBytes(objectData, 0); data.Velocity.ToBytes(objectData, 12); data.Acceleration.ToBytes(objectData, 24); - try - { - data.RotationOffset.ToBytes(objectData, 36); - } - catch (Exception e) - { - m_log.Warn("[LLClientView]: exception converting quaternion to bytes, using Quaternion.Identity. Exception: " + e.ToString()); - OpenMetaverse.Quaternion.Identity.ToBytes(objectData, 36); - } + + Quaternion rotation = data.RotationOffset; + rotation.Normalize(); + Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); + vrot.ToBytes(objectData, 36); data.AngularVelocity.ToBytes(objectData, 48); ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); -- cgit v1.1 From 919aef157385c694b598439e3a50a2fe7a4f9e98 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 19 Aug 2014 10:03:04 +0100 Subject: send zero velocity again on avatar full update or its ugly --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6eb0c5e..b0cb4ea 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -5291,7 +5291,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP byte[] objectData = new byte[76]; - Vector3 velocity = data.Velocity; + Vector3 velocity = new Vector3(0, 0, 0); Vector3 acceleration = new Vector3(0, 0, 0); rotation.Normalize(); Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); -- cgit v1.1