diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d0902ffc72..f6d138c7d0 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4776,12 +4776,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP // because we are requeuing the list of updates. They will be resent in new packets // with the most recent state and priority. m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber); + if(oPacket.Buffer == null) + return; + + m_udpClient.FreeUDPBuffer(oPacket.Buffer); // Count this as a resent packet since we are going to requeue all of the updates contained in it Interlocked.Increment(ref m_udpClient.PacketsResent); - // We're not going to worry about interlock yet since its not currently critical that this total count - // is 100% correct m_udpServer.PacketsResentCount++; foreach (EntityUpdate update in updates) @@ -5152,6 +5154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP int lastzc = 0; int count = 0; + bool shouldCreateSelected = false; //mantis 8639 EntityUpdate eu; for(int indx = 0; indx < objectUpdates.Count; ++indx) { @@ -5163,6 +5166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP else { SceneObjectPart part = (SceneObjectPart)eu.Entity; + shouldCreateSelected = part.CreateSelected; if (eu.Flags.HasFlag(PrimUpdateFlags.Animations)) { if (m_SupportObjectAnimations && part.Animations != null) @@ -5207,7 +5211,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (eu.Entity is ScenePresence) CreateAvatarUpdateBlock((ScenePresence)eu.Entity, zc); else + { + if(shouldCreateSelected) //mantis 8639 recover selected state + ((SceneObjectPart)eu.Entity).CreateSelected = true; CreatePrimUpdateBlock((SceneObjectPart)eu.Entity, mysp, zc); + } tau = new List(30); tau.Add(eu); @@ -5314,6 +5322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP int lastzc = 0; int count = 0; + bool shouldCreateSelected = false; //mantis 8639 EntityUpdate eu; for (int indx = 0; indx < compressedUpdates.Count; ++indx) { @@ -5322,6 +5331,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (sop.ParentGroup == null || sop.ParentGroup.IsDeleted) continue; + shouldCreateSelected = sop.CreateSelected; + if (eu.Flags.HasFlag(PrimUpdateFlags.Animations)) { if (m_SupportObjectAnimations && sop.Animations != null) @@ -5369,6 +5380,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP zc.ZeroCount = 0; zc.Position = countposition + 1; + if (shouldCreateSelected) //mantis 8639 recover selected state + sop.CreateSelected = true; + // im lazy now, just do last again CreateCompressedUpdateBlockZC(sop, mysp, zc); tau = new List(30);