aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-28 00:40:33 +0100
committerJustin Clark-Casey (justincc)2010-08-28 00:40:33 +0100
commit1c0b4457cdcd543f04bc818a987f6e3f2311098d (patch)
tree56b6a949423b5ca0f54b2c200e037052a9ac3ff0 /OpenSim/Region/Framework/Scenes/Scene.cs
parentminor: reduce log chattiness of "load iar" for IARs with lots of folders (diff)
downloadopensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.zip
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.gz
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.bz2
opensim-SC_OLD-1c0b4457cdcd543f04bc818a987f6e3f2311098d.tar.xz
Improve liveness by operating on list copies of SOG.Children where appropriate
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