mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
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:
@@ -2479,7 +2479,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||
//ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
|
||||
public void RemoveScriptEvents(UUID scriptid)
|
||||
{
|
||||
lock (m_scriptEvents)
|
||||
@@ -2533,6 +2533,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </summary>
|
||||
public void ScheduleFullUpdate()
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
|
||||
|
||||
if (m_parentGroup != null)
|
||||
{
|
||||
m_parentGroup.QueueForUpdateCheck();
|
||||
@@ -4042,6 +4044,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (m_parentGroup == null)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents() since m_parentGroup == null", Name, LocalId);
|
||||
ScheduleFullUpdate();
|
||||
return;
|
||||
}
|
||||
@@ -4058,9 +4062,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
LocalFlags=(PrimFlags)objectflagupdate;
|
||||
|
||||
if (m_parentGroup != null && m_parentGroup.RootPart == this)
|
||||
{
|
||||
m_parentGroup.aggregateScriptEvents();
|
||||
}
|
||||
else
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
|
||||
ScheduleFullUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public int registerTargetWaypoint(Vector3 target, float tolerance)
|
||||
|
||||
Reference in New Issue
Block a user