* Fix mantis 2130 - nre occuring sometimes when the regular prim update sweep occurs

* Fold m_deleted and m_isDeleted together (ugh!)
0.6.0-stable
Justin Clarke Casey 2008-09-06 00:44:50 +00:00
parent a4078c280a
commit 01878b886c
3 changed files with 7 additions and 19 deletions

View File

@ -142,7 +142,8 @@ namespace OpenSim.Region.Environment.Scenes
foreach (EntityBase entity in updateEntities) foreach (EntityBase entity in updateEntities)
{ {
entity.Update(); if (!entity.IsDeleted)
entity.Update();
} }
} }

View File

@ -760,7 +760,6 @@ namespace OpenSim.Region.Environment.Scenes
if (m_frame % m_update_backup == 0) if (m_frame % m_update_backup == 0)
{ {
UpdateStorageBackup(); UpdateStorageBackup();
} }
if (m_frame % m_update_terrain == 0) if (m_frame % m_update_terrain == 0)

View File

@ -105,7 +105,6 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>();
private bool m_deleted = false;
protected ulong m_regionHandle; protected ulong m_regionHandle;
protected SceneObjectPart m_rootPart; protected SceneObjectPart m_rootPart;
// private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>();
@ -961,7 +960,9 @@ namespace OpenSim.Region.Environment.Scenes
public void FakeDeleteGroup() public void FakeDeleteGroup()
{ {
m_deleted = true; // If there are any updates queued for this object when the 'fake' delete happens, then make sure
// that they don't happen, otherwise the deleted objects will reappear
m_isDeleted = true;
foreach (SceneObjectPart part in m_parts.Values) foreach (SceneObjectPart part in m_parts.Values)
{ {
@ -1499,10 +1500,7 @@ namespace OpenSim.Region.Environment.Scenes
//if (part.UpdateFlag == 0) part.UpdateFlag = 1; //if (part.UpdateFlag == 0) part.UpdateFlag = 1;
//} //}
checkAtTargets();
checkAtTargets();
if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
|| (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
@ -1548,16 +1546,6 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
public void ScheduleGroupForFullUpdate() public void ScheduleGroupForFullUpdate()
{ {
// If we wre in the delete queue, this will be set
// A full update now would make the prim reappear
// after KillObject was sent via FakeDeleteGroup
// causing flickering and delays in deletion.
// This leads to users clicking delete multiple times
// which can crash the session. So, avoid it.
//
if (m_deleted)
return;
checkAtTargets(); checkAtTargets();
lock (m_parts) lock (m_parts)
{ {