Completely prevent full update packets being sent after kill object packets
If a full update is sent after the kill, the object remains as in the linden viewer but in an undeletable and unowned state until relog This patch prevents this by recording kills in LLClientView0.6.9-post-fixes
parent
fa8def5e70
commit
8b5d012200
|
@ -40,7 +40,10 @@ using OpenMetaverse.Packets;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
|
<<<<<<< HEAD:OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
|
||||||
using OpenSim.Framework.Communications.Cache;
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
=======
|
||||||
|
>>>>>>> 696d711... Completely prevent full update packets being sent after kill object packets:OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
|
||||||
using OpenSim.Framework.Statistics;
|
using OpenSim.Framework.Statistics;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -348,6 +351,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates;
|
protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates;
|
||||||
private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates;
|
private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates;
|
||||||
private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates;
|
private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates;
|
||||||
|
|
||||||
|
/// <value>
|
||||||
|
/// List used in construction of data blocks for an object update packet. This is to stop us having to
|
||||||
|
/// continually recreate it.
|
||||||
|
/// </value>
|
||||||
|
protected List<ObjectUpdatePacket.ObjectDataBlock> m_fullUpdateDataBlocksBuilder;
|
||||||
|
|
||||||
|
/// <value>
|
||||||
|
/// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
|
||||||
|
/// thread servicing the m_primFullUpdates queue after a kill. If this happens the object persists as an
|
||||||
|
/// ownerless phantom.
|
||||||
|
///
|
||||||
|
/// All manipulation of this set has to occur under a m_primFullUpdate.SyncRoot lock
|
||||||
|
///
|
||||||
|
/// </value>
|
||||||
|
protected HashSet<uint> m_killRecord;
|
||||||
|
|
||||||
private int m_moneyBalance;
|
private int m_moneyBalance;
|
||||||
private int m_animationSequenceNumber = 1;
|
private int m_animationSequenceNumber = 1;
|
||||||
private bool m_SendLogoutPacketWhenClosing = true;
|
private bool m_SendLogoutPacketWhenClosing = true;
|
||||||
|
@ -437,6 +457,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
||||||
m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
||||||
m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
|
m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count);
|
||||||
|
m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>();
|
||||||
|
m_killRecord = new HashSet<uint>();
|
||||||
|
|
||||||
m_assetService = m_scene.RequestModuleInterface<IAssetService>();
|
m_assetService = m_scene.RequestModuleInterface<IAssetService>();
|
||||||
m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
|
m_hyperAssets = m_scene.RequestModuleInterface<IHyperAssetService>();
|
||||||
|
@ -1476,7 +1498,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
kill.ObjectData[0].ID = localID;
|
kill.ObjectData[0].ID = localID;
|
||||||
kill.Header.Reliable = true;
|
kill.Header.Reliable = true;
|
||||||
kill.Header.Zerocoded = true;
|
kill.Header.Zerocoded = true;
|
||||||
OutPacket(kill, ThrottleOutPacketType.State);
|
|
||||||
|
lock (m_primFullUpdates.SyncRoot)
|
||||||
|
{
|
||||||
|
m_killRecord.Add(localID);
|
||||||
|
OutPacket(kill, ThrottleOutPacketType.State);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3518,21 +3545,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count];
|
m_fullUpdateDataBlocksBuilder.Clear();
|
||||||
|
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
|
ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue();
|
||||||
|
//outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
|
||||||
|
|
||||||
|
if (!m_killRecord.Contains(block.ID))
|
||||||
|
{
|
||||||
|
m_fullUpdateDataBlocksBuilder.Add(block);
|
||||||
|
|
||||||
// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
|
// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
|
||||||
// if (text.IndexOf("\n") >= 0)
|
// if (text.IndexOf("\n") >= 0)
|
||||||
// text = text.Remove(text.IndexOf("\n"));
|
// text = text.Remove(text.IndexOf("\n"));
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
|
// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
|
||||||
// outPacket.ObjectData[i].ID, text, Name);
|
// outPacket.ObjectData[i].ID, text, Name);
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// m_log.WarnFormat(
|
||||||
|
// "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
OutPacket(outPacket, ThrottleOutPacketType.State);
|
outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray();
|
||||||
|
|
||||||
|
OutPacket(outPacket, ThrottleOutPacketType.State);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||||
|
|
Loading…
Reference in New Issue