aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-17 15:40:27 +0000
committerJustin Clarke Casey2008-11-17 15:40:27 +0000
commitd54b6608a7acfa7fc9fd074f2fbd241519067fcb (patch)
tree4fb604c6b80f0e67d9ea8e884941386a9a4d6a4f /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentfixing warnings in YProlog language support (diff)
downloadopensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.zip
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.gz
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.bz2
opensim-SC-d54b6608a7acfa7fc9fd074f2fbd241519067fcb.tar.xz
* Stop nulling SOG.m_rootPart and parts on object deletion
* This renders RootPart == null checks useless - the replacement is to check SOG.IsDeleted. However, in many cases this will not be necessary since updates to deleted parts will not be sent to the client * This should remove any remaining race conditions where an object is deleted while another thread is yet to obtain the root part to perform some operation * Doing this is probably a necessary prerequisite to moving to a model without a separate SOG and SOP * Unfortunately it's not possible to eliminate all RootPart == null checks since in some contexts it is currently used to check whether an object was created successfully
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index a02840c..74fa725 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -492,7 +492,7 @@ namespace OpenSim.Region.Environment.Scenes
492 StoreUndoState(); 492 StoreUndoState();
493 m_offsetPosition = value; 493 m_offsetPosition = value;
494 494
495 if (ParentGroup != null && ParentGroup.RootPart != null) 495 if (ParentGroup != null && !ParentGroup.IsDeleted)
496 { 496 {
497 if (_parentID != 0 && PhysActor != null) 497 if (_parentID != 0 && PhysActor != null)
498 { 498 {
@@ -1326,7 +1326,7 @@ if (m_shape != null) {
1326 { 1326 {
1327 if (m_parentGroup == null) 1327 if (m_parentGroup == null)
1328 return false; 1328 return false;
1329 if (m_parentGroup.RootPart == null) 1329 if (m_parentGroup.IsDeleted)
1330 return false; 1330 return false;
1331 1331
1332 return m_parentGroup.RootPart.DIE_AT_EDGE; 1332 return m_parentGroup.RootPart.DIE_AT_EDGE;
@@ -1604,7 +1604,7 @@ if (m_shape != null) {
1604 } 1604 }
1605 if (m_parentGroup == null) 1605 if (m_parentGroup == null)
1606 return; 1606 return;
1607 if (m_parentGroup.RootPart == null) 1607 if (m_parentGroup.IsDeleted)
1608 return; 1608 return;
1609 1609
1610 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0) 1610 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0)
@@ -2251,7 +2251,7 @@ if (m_shape != null) {
2251 { 2251 {
2252 if (m_parentGroup == null) 2252 if (m_parentGroup == null)
2253 return; 2253 return;
2254 if (m_parentGroup.RootPart == null) 2254 if (m_parentGroup.IsDeleted)
2255 return; 2255 return;
2256 2256
2257 m_parentGroup.RootPart.DIE_AT_EDGE = p; 2257 m_parentGroup.RootPart.DIE_AT_EDGE = p;
@@ -3022,7 +3022,7 @@ if (m_shape != null) {
3022 DoPhysicsPropertyUpdate(UsePhysics, false); 3022 DoPhysicsPropertyUpdate(UsePhysics, false);
3023 if (m_parentGroup != null) 3023 if (m_parentGroup != null)
3024 { 3024 {
3025 if (m_parentGroup.RootPart != null) 3025 if (!m_parentGroup.IsDeleted)
3026 { 3026 {
3027 if (LocalId == m_parentGroup.RootPart.LocalId) 3027 if (LocalId == m_parentGroup.RootPart.LocalId)
3028 { 3028 {
@@ -3070,7 +3070,7 @@ if (m_shape != null) {
3070 DoPhysicsPropertyUpdate(UsePhysics, true); 3070 DoPhysicsPropertyUpdate(UsePhysics, true);
3071 if (m_parentGroup != null) 3071 if (m_parentGroup != null)
3072 { 3072 {
3073 if (m_parentGroup.RootPart != null) 3073 if (!m_parentGroup.IsDeleted)
3074 { 3074 {
3075 if (LocalId == m_parentGroup.RootPart.LocalId) 3075 if (LocalId == m_parentGroup.RootPart.LocalId)
3076 { 3076 {
@@ -3086,7 +3086,7 @@ if (m_shape != null) {
3086 DoPhysicsPropertyUpdate(UsePhysics, false); 3086 DoPhysicsPropertyUpdate(UsePhysics, false);
3087 if (m_parentGroup != null) 3087 if (m_parentGroup != null)
3088 { 3088 {
3089 if (m_parentGroup.RootPart != null) 3089 if (!m_parentGroup.IsDeleted)
3090 { 3090 {
3091 if (LocalId == m_parentGroup.RootPart.LocalId) 3091 if (LocalId == m_parentGroup.RootPart.LocalId)
3092 { 3092 {
@@ -3341,7 +3341,7 @@ if (m_shape != null) {
3341 3341
3342 public void SendTerseUpdateToClient(IClientAPI remoteClient) 3342 public void SendTerseUpdateToClient(IClientAPI remoteClient)
3343 { 3343 {
3344 if (ParentGroup == null || ParentGroup.RootPart == null) 3344 if (ParentGroup == null || ParentGroup.IsDeleted)
3345 return; 3345 return;
3346 3346
3347 Vector3 lPos = OffsetPosition; 3347 Vector3 lPos = OffsetPosition;