aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorUbitUmarov2014-08-04 20:32:11 +0100
committerUbitUmarov2014-08-04 20:32:11 +0100
commit3d81f25e34cd7d536ad0e36242703ac1bc56038d (patch)
treeea317cda089e8c7e01e13077fc8038bff8ecd14d /OpenSim/Region/ClientStack
parentstart sending terrain in scenePresence after well defined avatar. Minor (diff)
downloadopensim-SC_OLD-3d81f25e34cd7d536ad0e36242703ac1bc56038d.zip
opensim-SC_OLD-3d81f25e34cd7d536ad0e36242703ac1bc56038d.tar.gz
opensim-SC_OLD-3d81f25e34cd7d536ad0e36242703ac1bc56038d.tar.bz2
opensim-SC_OLD-3d81f25e34cd7d536ad0e36242703ac1bc56038d.tar.xz
Revert "start sending terrain in scenePresence after well defined avatar. Minor"
This reverts commit 05a2feba5d780c57c252891a20071800fd9f2e3e.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs28
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs34
2 files changed, 25 insertions, 37 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7d61577..34a2797 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -577,10 +577,7 @@ 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 {
581 OnConnectionClosed(this); 580 OnConnectionClosed(this);
582 }
583
584 581
585 // Flush all of the packets out of the UDP server for this client 582 // Flush all of the packets out of the UDP server for this client
586 if (m_udpServer != null) 583 if (m_udpServer != null)
@@ -5521,7 +5518,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5521 AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject); 5518 AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject);
5522 AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand); 5519 AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand);
5523 5520
5524 AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false); 5521// AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, false);
5522 AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply, true);
5525 5523
5526 AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest); 5524 AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest);
5527 AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance); 5525 AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance);
@@ -5734,15 +5732,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5734 #region Scene/Avatar 5732 #region Scene/Avatar
5735 5733
5736 // Threshold for body rotation to be a significant agent update 5734 // Threshold for body rotation to be a significant agent update
5737 // private const float QDELTA = 0.000001f; 5735 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
5743 // Threshold for camera rotation to be a significant agent update 5736 // Threshold for camera rotation to be a significant agent update
5744 private const float VDELTA = 0.01f; 5737 private const float VDELTA = 0.01f;
5745 5738
5746 /// <summary> 5739 /// <summary>
5747 /// This checks the update significance against the last update made. 5740 /// This checks the update significance against the last update made.
5748 /// </summary> 5741 /// </summary>
@@ -5762,18 +5755,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5762 /// <param name='x'></param> 5755 /// <param name='x'></param>
5763 private bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x) 5756 private bool CheckAgentMovementUpdateSignificance(AgentUpdatePacket.AgentDataBlock x)
5764 { 5757 {
5765 // float qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2); 5758 float qdelta1 = 1 - (float)Math.Pow(Quaternion.Dot(x.BodyRotation, m_thisAgentUpdateArgs.BodyRotation), 2);
5766 //qdelta2 = 1 - (float)Math.Pow(Quaternion.Dot(x.HeadRotation, m_thisAgentUpdateArgs.HeadRotation), 2); 5759 //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));
5770 5760
5771 bool movementSignificant = 5761 bool movementSignificant =
5772// (qdelta1 > QDELTA) // significant if body rotation above threshold 5762 (qdelta1 > QDELTA) // significant if body rotation above threshold
5773 (qdelta1 < QDELTABODY) // higher angle lower cos 5763 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
5774// Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
5775 // || (qdelta2 > QDELTA * 10) // significant if head rotation above threshold 5764 // || (qdelta2 > QDELTA * 10) // significant if head rotation above threshold
5776 || (qdelta2 < QDELTAHEAD) // using cos above
5777 || (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed 5765 || (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed
5778 || (x.ControlFlags != (byte)AgentManager.ControlFlags.NONE) // significant if user supplying any movement update commands 5766 || (x.ControlFlags != (byte)AgentManager.ControlFlags.NONE) // significant if user supplying any movement update commands
5779 || (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed 5767 || (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed
@@ -6488,7 +6476,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6488 Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply; 6476 Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply;
6489 if (handlerRegionHandShakeReply != null) 6477 if (handlerRegionHandShakeReply != null)
6490 { 6478 {
6491// Thread.Sleep(500); 6479 Thread.Sleep(500);
6492 handlerRegionHandShakeReply(this); 6480 handlerRegionHandShakeReply(this);
6493 } 6481 }
6494 6482
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a3fdae1..b7c8594 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1750,10 +1750,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1750 endPoint, 1750 endPoint,
1751 sessionInfo); 1751 sessionInfo);
1752 1752
1753 // Send ack straight away to let the viewer know that the connection is active.
1754 // The client will be null if it already exists (e.g. if on a region crossing the client sends a use
1755 // circuit code to the existing child agent. This is not particularly obvious.
1756 SendAckImmediate(endPoint, uccp.Header.Sequence);
1757
1758 // We only want to send initial data to new clients, not ones which are being converted from child to root.
1759 if (client != null)
1760 {
1761 AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code);
1762 bool tp = (aCircuit.teleportFlags > 0);
1763 // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from
1764 if (!tp)
1765 client.SceneAgent.SendInitialDataToMe();
1766 }
1767
1753 // Now we know we can handle more data 1768 // Now we know we can handle more data
1754// Thread.Sleep(200); 1769 Thread.Sleep(200);
1755 1770
1756 // Obtain the pending queue and remove it from the cache 1771 // Obtain the queue and remove it from the cache
1757 Queue<UDPPacketBuffer> queue = null; 1772 Queue<UDPPacketBuffer> queue = null;
1758 1773
1759 lock (m_pendingCache) 1774 lock (m_pendingCache)
@@ -1775,21 +1790,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1775 PacketReceived(buf); 1790 PacketReceived(buf);
1776 } 1791 }
1777 queue = null; 1792 queue = null;
1778
1779 // Send ack straight away to let the viewer know that the connection is active.
1780 // The client will be null if it already exists (e.g. if on a region crossing the client sends a use
1781 // circuit code to the existing child agent. This is not particularly obvious.
1782 SendAckImmediate(endPoint, uccp.Header.Sequence);
1783
1784 // We only want to send initial data to new clients, not ones which are being converted from child to root.
1785 if (client != null)
1786 {
1787 AgentCircuitData aCircuit = m_scene.AuthenticateHandler.GetAgentCircuitData(uccp.CircuitCode.Code);
1788 bool tp = (aCircuit.teleportFlags > 0);
1789 // Let's delay this for TP agents, otherwise the viewer doesn't know where to get resources from
1790 if (!tp)
1791 client.SceneAgent.SendInitialDataToMe();
1792 }
1793 } 1793 }
1794 else 1794 else
1795 { 1795 {