aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-06 00:44:50 +0000
committerJustin Clarke Casey2008-09-06 00:44:50 +0000
commit01878b886cdf2133a1bea37f683a427301f89f44 (patch)
treecde0c7b516a85ff8f02eba64980e985359f6017a /OpenSim/Region/Environment
parent* Blind fix what looks like a bug in the new land MSSQL code (diff)
downloadopensim-SC-01878b886cdf2133a1bea37f683a427301f89f44.zip
opensim-SC-01878b886cdf2133a1bea37f683a427301f89f44.tar.gz
opensim-SC-01878b886cdf2133a1bea37f683a427301f89f44.tar.bz2
opensim-SC-01878b886cdf2133a1bea37f683a427301f89f44.tar.xz
* Fix mantis 2130 - nre occuring sometimes when the regular prim update sweep occurs
* Fold m_deleted and m_isDeleted together (ugh!)
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs22
3 files changed, 7 insertions, 19 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 3fa1825d..6b002fc 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -142,7 +142,8 @@ namespace OpenSim.Region.Environment.Scenes
142 142
143 foreach (EntityBase entity in updateEntities) 143 foreach (EntityBase entity in updateEntities)
144 { 144 {
145 entity.Update(); 145 if (!entity.IsDeleted)
146 entity.Update();
146 } 147 }
147 } 148 }
148 149
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 45062eb..becd7dc 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -760,7 +760,6 @@ namespace OpenSim.Region.Environment.Scenes
760 if (m_frame % m_update_backup == 0) 760 if (m_frame % m_update_backup == 0)
761 { 761 {
762 UpdateStorageBackup(); 762 UpdateStorageBackup();
763
764 } 763 }
765 764
766 if (m_frame % m_update_terrain == 0) 765 if (m_frame % m_update_terrain == 0)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index a86beae..7aa65c1 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -105,7 +105,6 @@ namespace OpenSim.Region.Environment.Scenes
105 /// </summary> 105 /// </summary>
106 protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); 106 protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>();
107 107
108 private bool m_deleted = false;
109 protected ulong m_regionHandle; 108 protected ulong m_regionHandle;
110 protected SceneObjectPart m_rootPart; 109 protected SceneObjectPart m_rootPart;
111 // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>(); 110 // private Dictionary<LLUUID, scriptEvents> m_scriptEvents = new Dictionary<LLUUID, scriptEvents>();
@@ -961,7 +960,9 @@ namespace OpenSim.Region.Environment.Scenes
961 960
962 public void FakeDeleteGroup() 961 public void FakeDeleteGroup()
963 { 962 {
964 m_deleted = true; 963 // If there are any updates queued for this object when the 'fake' delete happens, then make sure
964 // that they don't happen, otherwise the deleted objects will reappear
965 m_isDeleted = true;
965 966
966 foreach (SceneObjectPart part in m_parts.Values) 967 foreach (SceneObjectPart part in m_parts.Values)
967 { 968 {
@@ -1499,10 +1500,7 @@ namespace OpenSim.Region.Environment.Scenes
1499 //if (part.UpdateFlag == 0) part.UpdateFlag = 1; 1500 //if (part.UpdateFlag == 0) part.UpdateFlag = 1;
1500 //} 1501 //}
1501 1502
1502 1503 checkAtTargets();
1503
1504 checkAtTargets();
1505
1506 1504
1507 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) 1505 if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
1508 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) 1506 || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
@@ -1548,16 +1546,6 @@ namespace OpenSim.Region.Environment.Scenes
1548 /// </summary> 1546 /// </summary>
1549 public void ScheduleGroupForFullUpdate() 1547 public void ScheduleGroupForFullUpdate()
1550 { 1548 {
1551 // If we wre in the delete queue, this will be set
1552 // A full update now would make the prim reappear
1553 // after KillObject was sent via FakeDeleteGroup
1554 // causing flickering and delays in deletion.
1555 // This leads to users clicking delete multiple times
1556 // which can crash the session. So, avoid it.
1557 //
1558 if (m_deleted)
1559 return;
1560
1561 checkAtTargets(); 1549 checkAtTargets();
1562 lock (m_parts) 1550 lock (m_parts)
1563 { 1551 {
@@ -1572,7 +1560,7 @@ namespace OpenSim.Region.Environment.Scenes
1572 /// Schedule a terse update for this scene object 1560 /// Schedule a terse update for this scene object
1573 /// </summary> 1561 /// </summary>
1574 public void ScheduleGroupForTerseUpdate() 1562 public void ScheduleGroupForTerseUpdate()
1575 { 1563 {
1576 lock (m_parts) 1564 lock (m_parts)
1577 { 1565 {
1578 foreach (SceneObjectPart part in m_parts.Values) 1566 foreach (SceneObjectPart part in m_parts.Values)