aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b0bc188..843c426 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2091,6 +2091,9 @@ namespace OpenSim.Region.Framework.Scenes
2091 /// <param name="isNew"></param> 2091 /// <param name="isNew"></param>
2092 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) 2092 public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew)
2093 { 2093 {
2094 if (ParentGroup.Scene == null)
2095 return;
2096
2094 if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) 2097 if (!ParentGroup.Scene.PhysicalPrims && UsePhysics)
2095 return; 2098 return;
2096 2099
@@ -4582,7 +4585,7 @@ namespace OpenSim.Region.Framework.Scenes
4582 // For now, we use the NINJA naming scheme for identifying joints. 4585 // For now, we use the NINJA naming scheme for identifying joints.
4583 // In the future, we can support other joint specification schemes such as a 4586 // In the future, we can support other joint specification schemes such as a
4584 // custom checkbox in the viewer GUI. 4587 // custom checkbox in the viewer GUI.
4585 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4588 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4586 { 4589 {
4587 string hingeString = "hingejoint"; 4590 string hingeString = "hingejoint";
4588 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); 4591 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString);
@@ -4598,7 +4601,7 @@ namespace OpenSim.Region.Framework.Scenes
4598 // For now, we use the NINJA naming scheme for identifying joints. 4601 // For now, we use the NINJA naming scheme for identifying joints.
4599 // In the future, we can support other joint specification schemes such as a 4602 // In the future, we can support other joint specification schemes such as a
4600 // custom checkbox in the viewer GUI. 4603 // custom checkbox in the viewer GUI.
4601 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4604 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4602 { 4605 {
4603 string ballString = "balljoint"; 4606 string ballString = "balljoint";
4604 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); 4607 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString);
@@ -4614,7 +4617,7 @@ namespace OpenSim.Region.Framework.Scenes
4614 // For now, we use the NINJA naming scheme for identifying joints. 4617 // For now, we use the NINJA naming scheme for identifying joints.
4615 // In the future, we can support other joint specification schemes such as a 4618 // In the future, we can support other joint specification schemes such as a
4616 // custom checkbox in the viewer GUI. 4619 // custom checkbox in the viewer GUI.
4617 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4620 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4618 { 4621 {
4619 return IsHingeJoint() || IsBallJoint(); 4622 return IsHingeJoint() || IsBallJoint();
4620 } 4623 }
@@ -4733,7 +4736,6 @@ namespace OpenSim.Region.Framework.Scenes
4733 } 4736 }
4734 } 4737 }
4735 } 4738 }
4736
4737 else // it already has a physical representation 4739 else // it already has a physical representation
4738 { 4740 {
4739 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. 4741 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status.