Fix a problem where llDie() calls were sometimes leaving dead objects behind.

When an object was deleted, the remove script instance call was aggregating the scripting events as normal.
This would queue a full update of the prim before the viewer was notifed of the deletion of that prim (QuitPacket)
On some occasions, the QuitPacket would be sent before the full update was dequeued and sent.
In principle, you would think that a viewer would ignore updates for deleted prims.  But it appears that in the Linden viewer (1.23.5),
a prim update that arrives after the prim was deleted instead makes the deleted prim persist in the viewer.  Such prims have no properties
and cannot be removed from the viewer except by a relog.
This change stops the prim event aggregation call if it's being deleted anyway, hence removing the spurious viewer-confusing update.
This commit is contained in:
Justin Clark-Casey (justincc)
2010-01-25 21:51:58 +00:00
parent 19d4867af7
commit 38cfc9366c
8 changed files with 73 additions and 19 deletions

View File

@@ -1465,6 +1465,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendKillObject(ulong regionHandle, uint localID)
{
// m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle);
KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
// TODO: don't create new blocks if recycling an old packet
kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1];
@@ -3472,6 +3474,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendPrimitiveToClient(SendPrimitiveData data)
{
// string text = data.text;
// if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n"));
// m_log.DebugFormat(
// "[CLIENT]: Placing request to send full info about prim {0} text {1} to client {2}",
// data.localID, text, Name);
if (data.priority == double.NaN)
{
m_log.Error("[LLClientView] SendPrimitiveToClient received a NaN priority, dropping update");
@@ -3509,7 +3518,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[count];
for (int i = 0; i < count; i++)
{
outPacket.ObjectData[i] = m_primFullUpdates.Dequeue();
// string text = Util.FieldToString(outPacket.ObjectData[i].Text);
// if (text.IndexOf("\n") >= 0)
// text = text.Remove(text.IndexOf("\n"));
// m_log.DebugFormat(
// "[CLIENT]: Sending full info about prim {0} text {1} to client {2}",
// outPacket.ObjectData[i].ID, text, Name);
}
}
OutPacket(outPacket, ThrottleOutPacketType.State);