mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Improve liveness by operating on list copies of SOG.Children where appropriate
This commit is contained in:
@@ -2065,19 +2065,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
group.RemoveScriptInstances(true);
|
||||
}
|
||||
|
||||
List<SceneObjectPart> partList = null;
|
||||
lock (group.Children)
|
||||
partList = new List<SceneObjectPart>(group.Children.Values);
|
||||
|
||||
foreach (SceneObjectPart part in partList)
|
||||
{
|
||||
foreach (SceneObjectPart part in group.Children.Values)
|
||||
if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
|
||||
{
|
||||
if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0))
|
||||
{
|
||||
PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
|
||||
}
|
||||
else if (part.PhysActor != null)
|
||||
{
|
||||
PhysicsScene.RemovePrim(part.PhysActor);
|
||||
part.PhysActor = null;
|
||||
}
|
||||
PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed?
|
||||
}
|
||||
else if (part.PhysActor != null)
|
||||
{
|
||||
PhysicsScene.RemovePrim(part.PhysActor);
|
||||
part.PhysActor = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user