diff options
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b0e689c..c42446c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -6926,8 +6926,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6926 | return true; | 6926 | return true; |
6927 | } | 6927 | } |
6928 | 6928 | ||
6929 | uint m_DeRezObjectLasSeq = 0; | 6929 | private class DeRezObjectInfo |
6930 | Dictionary<UUID, List<uint>> m_DeRezObjectDelayed = new Dictionary<UUID, List<uint>>(); | 6930 | { |
6931 | public int count; | ||
6932 | public List<uint> objectids; | ||
6933 | } | ||
6934 | private Dictionary<UUID, DeRezObjectInfo> m_DeRezObjectDelayed = new Dictionary<UUID, DeRezObjectInfo>(); | ||
6931 | 6935 | ||
6932 | private bool HandlerDeRezObject(IClientAPI sender, Packet Pack) | 6936 | private bool HandlerDeRezObject(IClientAPI sender, Packet Pack) |
6933 | { | 6937 | { |
@@ -6943,23 +6947,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6943 | return true; | 6947 | return true; |
6944 | #endregion | 6948 | #endregion |
6945 | 6949 | ||
6946 | uint seq = DeRezPacket.Header.Sequence; | ||
6947 | if(seq <= m_DeRezObjectLasSeq) | ||
6948 | return true; | ||
6949 | m_DeRezObjectLasSeq = seq; | ||
6950 | |||
6951 | List<uint> deRezIDs; | 6950 | List<uint> deRezIDs; |
6952 | DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination; | 6951 | DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination; |
6953 | int numberPackets = DeRezPacket.AgentBlock.PacketCount; | 6952 | int numberPackets = DeRezPacket.AgentBlock.PacketCount; |
6954 | int curPacket = DeRezPacket.AgentBlock.PacketNumber; | 6953 | int curPacket = DeRezPacket.AgentBlock.PacketNumber; |
6955 | UUID id = DeRezPacket.AgentBlock.TransactionID; | 6954 | UUID id = DeRezPacket.AgentBlock.TransactionID; |
6956 | 6955 | ||
6957 | if (numberPackets > 1) | 6956 | if (numberPackets > 1) |
6958 | { | 6957 | { |
6959 | if(!m_DeRezObjectDelayed.TryGetValue(id, out deRezIDs)) | 6958 | DeRezObjectInfo info; |
6959 | if (!m_DeRezObjectDelayed.TryGetValue(id, out info)) | ||
6960 | { | 6960 | { |
6961 | deRezIDs = new List<uint>(); | 6961 | deRezIDs = new List<uint>(); |
6962 | m_DeRezObjectDelayed[id] = deRezIDs; | 6962 | info = new DeRezObjectInfo(); |
6963 | info.count = 0; | ||
6964 | info.objectids = deRezIDs; | ||
6965 | m_DeRezObjectDelayed[id] = info; | ||
6966 | } | ||
6967 | else | ||
6968 | { | ||
6969 | deRezIDs = info.objectids; | ||
6963 | } | 6970 | } |
6964 | 6971 | ||
6965 | foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData) | 6972 | foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData) |
@@ -6967,10 +6974,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6967 | deRezIDs.Add(data.ObjectLocalID); | 6974 | deRezIDs.Add(data.ObjectLocalID); |
6968 | } | 6975 | } |
6969 | 6976 | ||
6970 | if (curPacket < numberPackets - 1) | 6977 | info.count++; |
6978 | if (info.count < numberPackets) | ||
6971 | return true; | 6979 | return true; |
6972 | 6980 | ||
6973 | m_DeRezObjectDelayed.Remove(id); | 6981 | m_DeRezObjectDelayed.Remove(id); |
6982 | info.objectids = null; | ||
6974 | } | 6983 | } |
6975 | else | 6984 | else |
6976 | { | 6985 | { |