aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2014-08-04 19:57:47 +0100
committerUbitUmarov2014-08-04 19:57:47 +0100
commit05a2feba5d780c57c252891a20071800fd9f2e3e (patch)
tree690addc627a94a260536c4b8b270e60876634626 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parentlocal chat gods bug fix (diff)
downloadopensim-SC_OLD-05a2feba5d780c57c252891a20071800fd9f2e3e.zip
opensim-SC_OLD-05a2feba5d780c57c252891a20071800fd9f2e3e.tar.gz
opensim-SC_OLD-05a2feba5d780c57c252891a20071800fd9f2e3e.tar.bz2
opensim-SC_OLD-05a2feba5d780c57c252891a20071800fd9f2e3e.tar.xz
start sending terrain in scenePresence after well defined avatar. Minor
change on significante AgentUpdate check.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs28
1 files changed, 20 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 34a2797..7d61577 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -577,7 +577,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
577 577
578 // Fire the callback for this connection closing 578 // Fire the callback for this connection closing
579 if (OnConnectionClosed != null) 579 if (OnConnectionClosed != null)
580 {
580 OnConnectionClosed(this); 581 OnConnectionClosed(this);
582 }
583
581 584
582 // Flush all of the packets out of the UDP server for this client 585 // Flush all of the packets out of the UDP server for this client
583 if (m_udpServer != null) 586 if (m_udpServer != null)
@@ -5518,8 +5521,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5518 AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject); 5521 AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject);
5519 AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand); 5522 AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand);
5520 5523
5521// AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false); 5524 AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false);
5522 AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, true);
5523 5525
5524 AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest); 5526 AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest);
5525 AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance); 5527 AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance);
@@ -5732,10 +5734,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5732 #region Scene/Avatar 5734 #region Scene/Avatar
5733 5735
5734 // Threshold for body rotation to be a significant agent update 5736 // Threshold for body rotation to be a significant agent update
5735 private const float QDELTA = 0.000001f; 5737 // private const float QDELTA = 0.000001f;
5738 // QDELTA is now relative to abs of cos of angle between orientations
5739
5740 private const float QDELTABODY = 1 - 0.0001f;
5741 private const float QDELTAHEAD = 1 - 0.0001f;
5742
5736 // Threshold for camera rotation to be a significant agent update 5743 // Threshold for camera rotation to be a significant agent update
5737 private const float VDELTA = 0.01f; 5744 private const float VDELTA = 0.01f;
5738 5745
5739 /// <summary> 5746 /// <summary>
5740 /// This checks the update significance against the last update made. 5747 /// This checks the update significance against the last update made.
5741 /// </summary> 5748 /// </summary>
@@ -5755,13 +5762,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5755 /// <param name='x'></param> 5762 /// <param name='x'></param>
5756 private bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x) 5763 private bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
5757 { 5764 {
5758 float qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2); 5765 // float qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2);
5759 //qdelta2 = 1 - (float)Math.Pow(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation), 2); 5766 //qdelta2 = 1 - (float)Math.Pow(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation), 2);
5767 // now using abs of cos
5768 float qdelta1 = (float)Math.Abs(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation));
5769 float qdelta2 = (float)Math.Abs(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation));
5760 5770
5761 bool movementSignificant = 5771 bool movementSignificant =
5762 (qdelta1 > QDELTA) // significant if body rotation above threshold 5772// (qdelta1 > QDELTA) // significant if body rotation above threshold
5763 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack 5773 (qdelta1 < QDELTABODY) // higher angle lower cos
5774// Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
5764 // || (qdelta2 > QDELTA * 10) // significant if head rotation above threshold 5775 // || (qdelta2 > QDELTA * 10) // significant if head rotation above threshold
5776 || (qdelta2 < QDELTAHEAD) // using cos above
5765 || (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed 5777 || (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed
5766 || (x.ControlFlags != (byte)AgentManager.ControlFlags.NONE) // significant if user supplying any movement update commands 5778 || (x.ControlFlags != (byte)AgentManager.ControlFlags.NONE) // significant if user supplying any movement update commands
5767 || (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed 5779 || (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed
@@ -6476,7 +6488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6476 Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply; 6488 Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply;
6477 if (handlerRegionHandShakeReply != null) 6489 if (handlerRegionHandShakeReply != null)
6478 { 6490 {
6479 Thread.Sleep(500); 6491// Thread.Sleep(500);
6480 handlerRegionHandShakeReply(this); 6492 handlerRegionHandShakeReply(this);
6481 } 6493 }
6482 6494