diff options
author | teravus | 2012-12-07 20:15:32 -0500 |
---|---|---|
committer | teravus | 2012-12-07 20:15:32 -0500 |
commit | 0e2b717b4d262363995b2b351b4afe7c84889342 (patch) | |
tree | 9cd9d616d834ab1772884c8a504f9d40c24ecf86 /OpenSim/Region/ClientStack/Linden | |
parent | *TEST* diferent avatar collider (diff) | |
download | opensim-SC-0e2b717b4d262363995b2b351b4afe7c84889342.zip opensim-SC-0e2b717b4d262363995b2b351b4afe7c84889342.tar.gz opensim-SC-0e2b717b4d262363995b2b351b4afe7c84889342.tar.bz2 opensim-SC-0e2b717b4d262363995b2b351b4afe7c84889342.tar.xz |
* Should promote faster self appearance.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8e0b72f..c261f32 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -459,6 +459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
459 | } | 459 | } |
460 | 460 | ||
461 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } | 461 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } |
462 | private Dictionary<UUID,UUID> agentWearables = new Dictionary<UUID, UUID>(); | ||
462 | 463 | ||
463 | #endregion Properties | 464 | #endregion Properties |
464 | 465 | ||
@@ -2749,8 +2750,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2749 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); | 2750 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); |
2750 | return; | 2751 | return; |
2751 | } | 2752 | } |
2752 | 2753 | UUID WearableOut = UUID.Zero; | |
2753 | //m_log.Debug("sending asset " + req.RequestAssetID); | 2754 | bool isWearable = false; |
2755 | isWearable = agentWearables.TryGetValue(req.RequestAssetID, out WearableOut); | ||
2756 | // m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); | ||
2754 | TransferInfoPacket Transfer = new TransferInfoPacket(); | 2757 | TransferInfoPacket Transfer = new TransferInfoPacket(); |
2755 | Transfer.TransferInfo.ChannelType = 2; | 2758 | Transfer.TransferInfo.ChannelType = 2; |
2756 | Transfer.TransferInfo.Status = 0; | 2759 | Transfer.TransferInfo.Status = 0; |
@@ -2772,7 +2775,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2772 | Transfer.TransferInfo.Size = req.AssetInf.Data.Length; | 2775 | Transfer.TransferInfo.Size = req.AssetInf.Data.Length; |
2773 | Transfer.TransferInfo.TransferID = req.TransferRequestID; | 2776 | Transfer.TransferInfo.TransferID = req.TransferRequestID; |
2774 | Transfer.Header.Zerocoded = true; | 2777 | Transfer.Header.Zerocoded = true; |
2775 | OutPacket(Transfer, ThrottleOutPacketType.Asset); | 2778 | OutPacket(Transfer, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset); |
2776 | 2779 | ||
2777 | if (req.NumPackets == 1) | 2780 | if (req.NumPackets == 1) |
2778 | { | 2781 | { |
@@ -2783,7 +2786,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2783 | TransferPacket.TransferData.Data = req.AssetInf.Data; | 2786 | TransferPacket.TransferData.Data = req.AssetInf.Data; |
2784 | TransferPacket.TransferData.Status = 1; | 2787 | TransferPacket.TransferData.Status = 1; |
2785 | TransferPacket.Header.Zerocoded = true; | 2788 | TransferPacket.Header.Zerocoded = true; |
2786 | OutPacket(TransferPacket, ThrottleOutPacketType.Asset); | 2789 | OutPacket(TransferPacket, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset); |
2787 | } | 2790 | } |
2788 | else | 2791 | else |
2789 | { | 2792 | { |
@@ -2816,7 +2819,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2816 | TransferPacket.TransferData.Status = 1; | 2819 | TransferPacket.TransferData.Status = 1; |
2817 | } | 2820 | } |
2818 | TransferPacket.Header.Zerocoded = true; | 2821 | TransferPacket.Header.Zerocoded = true; |
2819 | OutPacket(TransferPacket, ThrottleOutPacketType.Asset); | 2822 | OutPacket(TransferPacket, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset); |
2820 | 2823 | ||
2821 | processedLength += chunkSize; | 2824 | processedLength += chunkSize; |
2822 | packetNumber++; | 2825 | packetNumber++; |
@@ -3571,24 +3574,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3571 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; | 3574 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3572 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3575 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3573 | int idx = 0; | 3576 | int idx = 0; |
3574 | for (int i = 0; i < wearables.Length; i++) | 3577 | lock (agentWearables) |
3575 | { | 3578 | { |
3576 | for (int j = 0; j < wearables[i].Count; j++) | 3579 | agentWearables.Clear(); |
3580 | for (int i = 0; i < wearables.Length; i++) | ||
3577 | { | 3581 | { |
3578 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3582 | for (int j = 0; j < wearables[i].Count; j++) |
3579 | awb.WearableType = (byte)i; | 3583 | { |
3580 | awb.AssetID = wearables[i][j].AssetID; | 3584 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3581 | awb.ItemID = wearables[i][j].ItemID; | 3585 | awb.WearableType = (byte) i; |
3582 | aw.WearableData[idx] = awb; | 3586 | awb.AssetID = wearables[i][j].AssetID; |
3583 | idx++; | 3587 | awb.ItemID = wearables[i][j].ItemID; |
3584 | 3588 | agentWearables.Add(awb.AssetID, awb.ItemID); | |
3585 | // m_log.DebugFormat( | 3589 | aw.WearableData[idx] = awb; |
3586 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3590 | idx++; |
3587 | // awb.ItemID, awb.AssetID, i, Name); | 3591 | |
3592 | // m_log.DebugFormat( | ||
3593 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | ||
3594 | // awb.ItemID, awb.AssetID, i, Name); | ||
3595 | } | ||
3588 | } | 3596 | } |
3589 | } | 3597 | } |
3590 | 3598 | ||
3591 | OutPacket(aw, ThrottleOutPacketType.Task); | 3599 | OutPacket(aw, ThrottleOutPacketType.State); |
3592 | } | 3600 | } |
3593 | 3601 | ||
3594 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) | 3602 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) |
@@ -3613,7 +3621,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3613 | avp.Sender.IsTrial = false; | 3621 | avp.Sender.IsTrial = false; |
3614 | avp.Sender.ID = agentID; | 3622 | avp.Sender.ID = agentID; |
3615 | //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); | 3623 | //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); |
3616 | OutPacket(avp, ThrottleOutPacketType.Task); | 3624 | OutPacket(avp, ThrottleOutPacketType.State); |
3617 | } | 3625 | } |
3618 | 3626 | ||
3619 | public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) | 3627 | public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) |
@@ -7770,6 +7778,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7770 | if ((ImageType)block.Type == ImageType.Baked) | 7778 | if ((ImageType)block.Type == ImageType.Baked) |
7771 | args.Priority *= 2.0f; | 7779 | args.Priority *= 2.0f; |
7772 | 7780 | ||
7781 | UUID wearableout = UUID.Zero; | ||
7782 | if (agentWearables.TryGetValue(block.Image, out wearableout)) | ||
7783 | { | ||
7784 | args.Priority *= 2.0f; | ||
7785 | } | ||
7786 | |||
7773 | ImageManager.EnqueueReq(args); | 7787 | ImageManager.EnqueueReq(args); |
7774 | } | 7788 | } |
7775 | 7789 | ||