* This is a better way to do the last commit.
parent
0e2b717b4d
commit
6c1a852137
|
@ -459,7 +459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
|
||||
public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } }
|
||||
private Dictionary<UUID,UUID> agentWearables = new Dictionary<UUID, UUID>();
|
||||
|
||||
|
||||
#endregion Properties
|
||||
|
||||
|
@ -585,6 +585,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// Disable UDP handling for this client
|
||||
m_udpClient.Shutdown();
|
||||
|
||||
|
||||
//m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false));
|
||||
//GC.Collect();
|
||||
//m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true));
|
||||
|
@ -2750,10 +2751,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
req.AssetInf.ID, req.AssetInf.Metadata.ContentType);
|
||||
return;
|
||||
}
|
||||
UUID WearableOut = UUID.Zero;
|
||||
int WearableOut = 0;
|
||||
bool isWearable = false;
|
||||
isWearable = agentWearables.TryGetValue(req.RequestAssetID, out WearableOut);
|
||||
// m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
|
||||
|
||||
if (req.AssetInf != null)
|
||||
isWearable =
|
||||
((AssetType) req.AssetInf.Type ==
|
||||
AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing);
|
||||
|
||||
|
||||
//m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
|
||||
|
||||
|
||||
//if (isWearable)
|
||||
// m_log.Debug((AssetType)req.AssetInf.Type);
|
||||
|
||||
TransferInfoPacket Transfer = new TransferInfoPacket();
|
||||
Transfer.TransferInfo.ChannelType = 2;
|
||||
Transfer.TransferInfo.Status = 0;
|
||||
|
@ -3574,9 +3586,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
|
||||
AgentWearablesUpdatePacket.WearableDataBlock awb;
|
||||
int idx = 0;
|
||||
lock (agentWearables)
|
||||
{
|
||||
agentWearables.Clear();
|
||||
|
||||
for (int i = 0; i < wearables.Length; i++)
|
||||
{
|
||||
for (int j = 0; j < wearables[i].Count; j++)
|
||||
|
@ -3585,7 +3595,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
awb.WearableType = (byte) i;
|
||||
awb.AssetID = wearables[i][j].AssetID;
|
||||
awb.ItemID = wearables[i][j].ItemID;
|
||||
agentWearables.Add(awb.AssetID, awb.ItemID);
|
||||
aw.WearableData[idx] = awb;
|
||||
idx++;
|
||||
|
||||
|
@ -3594,7 +3603,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// awb.ItemID, awb.AssetID, i, Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OutPacket(aw, ThrottleOutPacketType.State);
|
||||
}
|
||||
|
@ -7777,12 +7785,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
// surrounding scene
|
||||
if ((ImageType)block.Type == ImageType.Baked)
|
||||
args.Priority *= 2.0f;
|
||||
|
||||
UUID wearableout = UUID.Zero;
|
||||
if (agentWearables.TryGetValue(block.Image, out wearableout))
|
||||
{
|
||||
args.Priority *= 2.0f;
|
||||
}
|
||||
int wearableout = 0;
|
||||
|
||||
ImageManager.EnqueueReq(args);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue