diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b198ca7..ffb86f3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2088,6 +2088,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2088 | /// <param name="isNew"></param> | 2088 | /// <param name="isNew"></param> |
2089 | public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) | 2089 | public void DoPhysicsPropertyUpdate(bool UsePhysics, bool isNew) |
2090 | { | 2090 | { |
2091 | if (ParentGroup.Scene == null) | ||
2092 | return; | ||
2093 | |||
2091 | if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) | 2094 | if (!ParentGroup.Scene.PhysicalPrims && UsePhysics) |
2092 | return; | 2095 | return; |
2093 | 2096 | ||
@@ -4579,7 +4582,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4579 | // For now, we use the NINJA naming scheme for identifying joints. | 4582 | // For now, we use the NINJA naming scheme for identifying joints. |
4580 | // In the future, we can support other joint specification schemes such as a | 4583 | // In the future, we can support other joint specification schemes such as a |
4581 | // custom checkbox in the viewer GUI. | 4584 | // custom checkbox in the viewer GUI. |
4582 | if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4585 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4583 | { | 4586 | { |
4584 | string hingeString = "hingejoint"; | 4587 | string hingeString = "hingejoint"; |
4585 | return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); | 4588 | return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); |
@@ -4595,7 +4598,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4595 | // For now, we use the NINJA naming scheme for identifying joints. | 4598 | // For now, we use the NINJA naming scheme for identifying joints. |
4596 | // In the future, we can support other joint specification schemes such as a | 4599 | // In the future, we can support other joint specification schemes such as a |
4597 | // custom checkbox in the viewer GUI. | 4600 | // custom checkbox in the viewer GUI. |
4598 | if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4601 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4599 | { | 4602 | { |
4600 | string ballString = "balljoint"; | 4603 | string ballString = "balljoint"; |
4601 | return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); | 4604 | return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); |
@@ -4611,7 +4614,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4611 | // For now, we use the NINJA naming scheme for identifying joints. | 4614 | // For now, we use the NINJA naming scheme for identifying joints. |
4612 | // In the future, we can support other joint specification schemes such as a | 4615 | // In the future, we can support other joint specification schemes such as a |
4613 | // custom checkbox in the viewer GUI. | 4616 | // custom checkbox in the viewer GUI. |
4614 | if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) | 4617 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) |
4615 | { | 4618 | { |
4616 | return IsHingeJoint() || IsBallJoint(); | 4619 | return IsHingeJoint() || IsBallJoint(); |
4617 | } | 4620 | } |
@@ -4730,7 +4733,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4730 | } | 4733 | } |
4731 | } | 4734 | } |
4732 | } | 4735 | } |
4733 | |||
4734 | else // it already has a physical representation | 4736 | else // it already has a physical representation |
4735 | { | 4737 | { |
4736 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. | 4738 | DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. |