diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 520f1a1..ec97d25 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1790,8 +1790,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1790 | 1790 | ||
1791 | if (group.RootPart == null) | 1791 | if (group.RootPart == null) |
1792 | { | 1792 | { |
1793 | m_log.ErrorFormat("[SCENE]: Found a SceneObjectGroup with m_rootPart == null and {0} children", | 1793 | m_log.ErrorFormat( |
1794 | group.Children == null ? 0 : group.Children.Count); | 1794 | "[SCENE]: Found a SceneObjectGroup with m_rootPart == null and {0} children", |
1795 | group.Children == null ? 0 : group.PrimCount); | ||
1795 | } | 1796 | } |
1796 | 1797 | ||
1797 | AddRestoredSceneObject(group, true, true); | 1798 | AddRestoredSceneObject(group, true, true); |
@@ -2130,18 +2131,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
2130 | group.RemoveScriptInstances(true); | 2131 | group.RemoveScriptInstances(true); |
2131 | } | 2132 | } |
2132 | 2133 | ||
2133 | foreach (SceneObjectPart part in group.Children.Values) | 2134 | lock (group.Children) |
2134 | { | 2135 | { |
2135 | if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0)) | 2136 | foreach (SceneObjectPart part in group.Children.Values) |
2136 | { | 2137 | { |
2137 | PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? | 2138 | if (part.IsJoint() && ((part.Flags & PrimFlags.Physics) != 0)) |
2138 | } | 2139 | { |
2139 | else if (part.PhysActor != null) | 2140 | PhysicsScene.RequestJointDeletion(part.Name); // FIXME: what if the name changed? |
2140 | { | 2141 | } |
2141 | PhysicsScene.RemovePrim(part.PhysActor); | 2142 | else if (part.PhysActor != null) |
2142 | part.PhysActor = null; | 2143 | { |
2144 | PhysicsScene.RemovePrim(part.PhysActor); | ||
2145 | part.PhysActor = null; | ||
2146 | } | ||
2143 | } | 2147 | } |
2144 | } | 2148 | } |
2149 | |||
2145 | // if (rootPart.PhysActor != null) | 2150 | // if (rootPart.PhysActor != null) |
2146 | // { | 2151 | // { |
2147 | // PhysicsScene.RemovePrim(rootPart.PhysActor); | 2152 | // PhysicsScene.RemovePrim(rootPart.PhysActor); |
@@ -2498,14 +2503,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2498 | 2503 | ||
2499 | // Force allocation of new LocalId | 2504 | // Force allocation of new LocalId |
2500 | // | 2505 | // |
2501 | foreach (SceneObjectPart p in sceneObject.Children.Values) | 2506 | lock (sceneObject.Children) |
2502 | p.LocalId = 0; | 2507 | { |
2508 | foreach (SceneObjectPart p in sceneObject.Children.Values) | ||
2509 | p.LocalId = 0; | ||
2510 | } | ||
2503 | 2511 | ||
2504 | if (sceneObject.IsAttachmentCheckFull()) // Attachment | 2512 | if (sceneObject.IsAttachmentCheckFull()) // Attachment |
2505 | { | 2513 | { |
2506 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); | 2514 | sceneObject.RootPart.AddFlag(PrimFlags.TemporaryOnRez); |
2507 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); | 2515 | sceneObject.RootPart.AddFlag(PrimFlags.Phantom); |
2508 | |||
2509 | 2516 | ||
2510 | // Don't sent a full update here because this will cause full updates to be sent twice for | 2517 | // Don't sent a full update here because this will cause full updates to be sent twice for |
2511 | // attachments on region crossings, resulting in viewer glitches. | 2518 | // attachments on region crossings, resulting in viewer glitches. |
@@ -2519,7 +2526,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2519 | 2526 | ||
2520 | if (sp != null) | 2527 | if (sp != null) |
2521 | { | 2528 | { |
2522 | |||
2523 | SceneObjectGroup grp = sceneObject; | 2529 | SceneObjectGroup grp = sceneObject; |
2524 | 2530 | ||
2525 | m_log.DebugFormat( | 2531 | m_log.DebugFormat( |