aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5fe944d..db081cc 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2065,19 +2065,20 @@ namespace OpenSim.Region.Framework.Scenes
2065 group.RemoveScriptInstances(true); 2065 group.RemoveScriptInstances(true);
2066 } 2066 }
2067 2067
2068 List<SceneObjectPart> partList = null;
2068 lock (group.Children) 2069 lock (group.Children)
2070 partList = new List<SceneObjectPart>(group.Children.Values);
2071
2072 foreach (SceneObjectPart part in partList)
2069 { 2073 {
2070 foreach (SceneObjectPart part in group.Children.Values) 2074 if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
2071 { 2075 {
2072 if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0)) 2076 PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
2073 { 2077 }
2074 PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? 2078 else if (part.PhysActor != null)
2075 } 2079 {
2076 else if (part.PhysActor != null) 2080 PhysicsScene.RemovePrim(part.PhysActor);
2077 { 2081 part.PhysActor = null;
2078 PhysicsScene.RemovePrim(part.PhysActor);
2079 part.PhysActor = null;
2080 }
2081 } 2082 }
2082 } 2083 }
2083 2084