aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-01-25 21:51:58 +0000
committerJustin Clark-Casey (justincc)2010-01-25 21:51:58 +0000
commit38cfc9366ce264d2aeb6409df48be7cecc348952 (patch)
tree2f90126ff91a339436d93f1c7d13fd69e1a44f24 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parent* Quick fix to Remote Console session ID handling. (diff)
downloadopensim-SC_OLD-38cfc9366ce264d2aeb6409df48be7cecc348952.zip
opensim-SC_OLD-38cfc9366ce264d2aeb6409df48be7cecc348952.tar.gz
opensim-SC_OLD-38cfc9366ce264d2aeb6409df48be7cecc348952.tar.bz2
opensim-SC_OLD-38cfc9366ce264d2aeb6409df48be7cecc348952.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 56b2f13..a5296eb 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2479,7 +2479,7 @@ namespace OpenSim.Region.Framework.Scenes
2479 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 2479 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
2480 //ScheduleFullUpdate(); 2480 //ScheduleFullUpdate();
2481 } 2481 }
2482 2482
2483 public void RemoveScriptEvents(UUID scriptid) 2483 public void RemoveScriptEvents(UUID scriptid)
2484 { 2484 {
2485 lock (m_scriptEvents) 2485 lock (m_scriptEvents)
@@ -2533,6 +2533,8 @@ namespace OpenSim.Region.Framework.Scenes
2533 /// </summary> 2533 /// </summary>
2534 public void ScheduleFullUpdate() 2534 public void ScheduleFullUpdate()
2535 { 2535 {
2536// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
2537
2536 if (m_parentGroup != null) 2538 if (m_parentGroup != null)
2537 { 2539 {
2538 m_parentGroup.QueueForUpdateCheck(); 2540 m_parentGroup.QueueForUpdateCheck();
@@ -4042,6 +4044,8 @@ namespace OpenSim.Region.Framework.Scenes
4042 4044
4043 if (m_parentGroup == null) 4045 if (m_parentGroup == null)
4044 { 4046 {
4047// m_log.DebugFormat(
4048// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents() since m_parentGroup == null", Name, LocalId);
4045 ScheduleFullUpdate(); 4049 ScheduleFullUpdate();
4046 return; 4050 return;
4047 } 4051 }
@@ -4058,9 +4062,15 @@ namespace OpenSim.Region.Framework.Scenes
4058 LocalFlags=(PrimFlags)objectflagupdate; 4062 LocalFlags=(PrimFlags)objectflagupdate;
4059 4063
4060 if (m_parentGroup != null && m_parentGroup.RootPart == this) 4064 if (m_parentGroup != null && m_parentGroup.RootPart == this)
4065 {
4061 m_parentGroup.aggregateScriptEvents(); 4066 m_parentGroup.aggregateScriptEvents();
4067 }
4062 else 4068 else
4069 {
4070// m_log.DebugFormat(
4071// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
4063 ScheduleFullUpdate(); 4072 ScheduleFullUpdate();
4073 }
4064 } 4074 }
4065 4075
4066 public int registerTargetWaypoint(Vector3 target, float tolerance) 4076 public int registerTargetWaypoint(Vector3 target, float tolerance)