aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-11-23 02:09:35 +0000
committerUbitUmarov2018-11-23 02:09:35 +0000
commit590d7ccf432c220c6daf8b4abfeec2b447ae52ef (patch)
tree834ad8ae5433e9a421644b31d8b178d340f0d6fc /OpenSim/Region
parentYengine: rename a local var (diff)
downloadopensim-SC-590d7ccf432c220c6daf8b4abfeec2b447ae52ef.zip
opensim-SC-590d7ccf432c220c6daf8b4abfeec2b447ae52ef.tar.gz
opensim-SC-590d7ccf432c220c6daf8b4abfeec2b447ae52ef.tar.bz2
opensim-SC-590d7ccf432c220c6daf8b4abfeec2b447ae52ef.tar.xz
try better handling of llupd DeRezObject
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs52
1 files changed, 41 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index bbaa0e2..4be5ef3 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -6990,8 +6990,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6990 return true; 6990 return true;
6991 } 6991 }
6992 6992
6993 uint m_DeRezObjectLasSeq = 0;
6994 Dictionary<UUID, List<uint>> m_DeRezObjectDelayed = new Dictionary<UUID, List<uint>>();
6995
6993 private bool HandlerDeRezObject(IClientAPI sender, Packet Pack) 6996 private bool HandlerDeRezObject(IClientAPI sender, Packet Pack)
6994 { 6997 {
6998 DeRezObject handlerDeRezObject = OnDeRezObject;
6999 if (handlerDeRezObject == null)
7000 return true;
7001
6995 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack; 7002 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
6996 7003
6997 #region Packet Session and User Check 7004 #region Packet Session and User Check
@@ -7003,24 +7010,47 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7003 } 7010 }
7004 #endregion 7011 #endregion
7005 7012
7006 DeRezObject handlerDeRezObject = OnDeRezObject; 7013 uint seq = DeRezPacket.Header.Sequence;
7007 if (handlerDeRezObject != null) 7014 if(seq <= m_DeRezObjectLasSeq)
7015 return true;
7016 m_DeRezObjectLasSeq = seq;
7017
7018 List<uint> deRezIDs;
7019 DeRezAction action = (DeRezAction)DeRezPacket.AgentBlock.Destination;
7020 int numberPackets = DeRezPacket.AgentBlock.PacketCount;
7021 int curPacket = DeRezPacket.AgentBlock.PacketNumber;
7022 UUID id = DeRezPacket.AgentBlock.TransactionID;
7023
7024 if (numberPackets > 1)
7008 { 7025 {
7009 List<uint> deRezIDs = new List<uint>(); 7026 if(!m_DeRezObjectDelayed.TryGetValue(id, out deRezIDs))
7027 {
7028 deRezIDs = new List<uint>();
7029 m_DeRezObjectDelayed[id] = deRezIDs;
7030 }
7010 7031
7011 foreach (DeRezObjectPacket.ObjectDataBlock data in 7032 foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData)
7012 DeRezPacket.ObjectData)
7013 { 7033 {
7014 deRezIDs.Add(data.ObjectLocalID); 7034 deRezIDs.Add(data.ObjectLocalID);
7015 } 7035 }
7016 // It just so happens that the values on the DeRezAction enumerator match the Destination
7017 // values given by a Second Life client
7018 handlerDeRezObject(this, deRezIDs,
7019 DeRezPacket.AgentBlock.GroupID,
7020 (DeRezAction)DeRezPacket.AgentBlock.Destination,
7021 DeRezPacket.AgentBlock.DestinationID);
7022 7036
7037 if (curPacket < numberPackets - 1)
7038 return true;
7039
7040 m_DeRezObjectDelayed.Remove(id);
7041 }
7042 else
7043 {
7044 deRezIDs = new List<uint>();
7045 foreach (DeRezObjectPacket.ObjectDataBlock data in DeRezPacket.ObjectData)
7046 {
7047 deRezIDs.Add(data.ObjectLocalID);
7048 }
7023 } 7049 }
7050 if (handlerDeRezObject != null)
7051 handlerDeRezObject(this, deRezIDs, DeRezPacket.AgentBlock.GroupID,
7052 action, DeRezPacket.AgentBlock.DestinationID);
7053
7024 return true; 7054 return true;
7025 } 7055 }
7026 7056