diff options
author | teravus | 2012-12-08 00:05:12 -0500 |
---|---|---|
committer | teravus | 2012-12-08 00:05:12 -0500 |
commit | 6c1a852137e3a66db5befa4c6ec50b3a93268304 (patch) | |
tree | d8d830c6f87e41d86635ff7d0a217ee20ebbf220 /OpenSim/Region/ClientStack | |
parent | * Should promote faster self appearance. (diff) | |
download | opensim-SC_OLD-6c1a852137e3a66db5befa4c6ec50b3a93268304.zip opensim-SC_OLD-6c1a852137e3a66db5befa4c6ec50b3a93268304.tar.gz opensim-SC_OLD-6c1a852137e3a66db5befa4c6ec50b3a93268304.tar.bz2 opensim-SC_OLD-6c1a852137e3a66db5befa4c6ec50b3a93268304.tar.xz |
* This is a better way to do the last commit.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 63 |
1 files changed, 33 insertions, 30 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c261f32..7cf6cf1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -459,7 +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 | ||
464 | #endregion Properties | 464 | #endregion Properties |
465 | 465 | ||
@@ -585,6 +585,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
585 | // Disable UDP handling for this client | 585 | // Disable UDP handling for this client |
586 | m_udpClient.Shutdown(); | 586 | m_udpClient.Shutdown(); |
587 | 587 | ||
588 | |||
588 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); | 589 | //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); |
589 | //GC.Collect(); | 590 | //GC.Collect(); |
590 | //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); | 591 | //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); |
@@ -2750,10 +2751,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2750 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); | 2751 | req.AssetInf.ID, req.AssetInf.Metadata.ContentType); |
2751 | return; | 2752 | return; |
2752 | } | 2753 | } |
2753 | UUID WearableOut = UUID.Zero; | 2754 | int WearableOut = 0; |
2754 | bool isWearable = false; | 2755 | bool isWearable = false; |
2755 | isWearable = agentWearables.TryGetValue(req.RequestAssetID, out WearableOut); | 2756 | |
2756 | // m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); | 2757 | if (req.AssetInf != null) |
2758 | isWearable = | ||
2759 | ((AssetType) req.AssetInf.Type == | ||
2760 | AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing); | ||
2761 | |||
2762 | |||
2763 | //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); | ||
2764 | |||
2765 | |||
2766 | //if (isWearable) | ||
2767 | // m_log.Debug((AssetType)req.AssetInf.Type); | ||
2768 | |||
2757 | TransferInfoPacket Transfer = new TransferInfoPacket(); | 2769 | TransferInfoPacket Transfer = new TransferInfoPacket(); |
2758 | Transfer.TransferInfo.ChannelType = 2; | 2770 | Transfer.TransferInfo.ChannelType = 2; |
2759 | Transfer.TransferInfo.Status = 0; | 2771 | Transfer.TransferInfo.Status = 0; |
@@ -3574,27 +3586,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3574 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; | 3586 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3575 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3587 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3576 | int idx = 0; | 3588 | int idx = 0; |
3577 | lock (agentWearables) | 3589 | |
3578 | { | 3590 | for (int i = 0; i < wearables.Length; i++) |
3579 | agentWearables.Clear(); | ||
3580 | for (int i = 0; i < wearables.Length; i++) | ||
3581 | { | ||
3582 | for (int j = 0; j < wearables[i].Count; j++) | ||
3583 | { | 3591 | { |
3584 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3592 | for (int j = 0; j < wearables[i].Count; j++) |
3585 | awb.WearableType = (byte) i; | 3593 | { |
3586 | awb.AssetID = wearables[i][j].AssetID; | 3594 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3587 | awb.ItemID = wearables[i][j].ItemID; | 3595 | awb.WearableType = (byte) i; |
3588 | agentWearables.Add(awb.AssetID, awb.ItemID); | 3596 | awb.AssetID = wearables[i][j].AssetID; |
3589 | aw.WearableData[idx] = awb; | 3597 | awb.ItemID = wearables[i][j].ItemID; |
3590 | idx++; | 3598 | aw.WearableData[idx] = awb; |
3591 | 3599 | idx++; | |
3592 | // m_log.DebugFormat( | 3600 | |
3593 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3601 | // m_log.DebugFormat( |
3594 | // awb.ItemID, awb.AssetID, i, Name); | 3602 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3595 | } | 3603 | // awb.ItemID, awb.AssetID, i, Name); |
3596 | } | 3604 | } |
3597 | } | 3605 | } |
3598 | 3606 | ||
3599 | OutPacket(aw, ThrottleOutPacketType.State); | 3607 | OutPacket(aw, ThrottleOutPacketType.State); |
3600 | } | 3608 | } |
@@ -7777,12 +7785,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7777 | // surrounding scene | 7785 | // surrounding scene |
7778 | if ((ImageType)block.Type == ImageType.Baked) | 7786 | if ((ImageType)block.Type == ImageType.Baked) |
7779 | args.Priority *= 2.0f; | 7787 | args.Priority *= 2.0f; |
7780 | 7788 | int wearableout = 0; | |
7781 | UUID wearableout = UUID.Zero; | ||
7782 | if (agentWearables.TryGetValue(block.Image, out wearableout)) | ||
7783 | { | ||
7784 | args.Priority *= 2.0f; | ||
7785 | } | ||
7786 | 7789 | ||
7787 | ImageManager.EnqueueReq(args); | 7790 | ImageManager.EnqueueReq(args); |
7788 | } | 7791 | } |