aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneGraph.cs7
2 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 594972d..29f1302 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2146,6 +2146,11 @@ namespace OpenSim.Region.Environment.Scenes
2146 { 2146 {
2147 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); 2147 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData);
2148 2148
2149 // Force allocation of new LocalId
2150 //
2151 foreach (SceneObjectPart p in sceneObject.Children.Values)
2152 p.LocalId = 0;
2153
2149 AddRestoredSceneObject(sceneObject, true, false); 2154 AddRestoredSceneObject(sceneObject, true, false);
2150 2155
2151 SceneObjectPart RootPrim = GetSceneObjectPart(primID); 2156 SceneObjectPart RootPrim = GetSceneObjectPart(primID);
@@ -2185,6 +2190,9 @@ namespace OpenSim.Region.Environment.Scenes
2185 // LastOwnerID is used for group deeding, so when you do stuff 2190 // LastOwnerID is used for group deeding, so when you do stuff
2186 // with the deeded object, it goes back to them 2191 // with the deeded object, it goes back to them
2187 2192
2193 foreach (SceneObjectPart prim in grp.Children.Values)
2194 prim.ParentID = sp.LocalId;
2195
2188 grp.SetFromAssetID(grp.RootPart.LastOwnerID); 2196 grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2189 m_log.DebugFormat("[ATTACHMENT]: Attach to avatar {0}", sp.UUID.ToString()); 2197 m_log.DebugFormat("[ATTACHMENT]: Attach to avatar {0}", sp.UUID.ToString());
2190 AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); 2198 AttachObject(sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
index 3b6aa15..6901728 100644
--- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
@@ -1440,7 +1440,12 @@ namespace OpenSim.Region.Environment.Scenes
1440 if (ent is SceneObjectGroup) 1440 if (ent is SceneObjectGroup)
1441 { 1441 {
1442 SceneObjectGroup obj = (SceneObjectGroup)ent; 1442 SceneObjectGroup obj = (SceneObjectGroup)ent;
1443 sceneObjects.Add(obj.LocalId, obj); 1443 // Nasty one. Can't unlink anything in the sim
1444 // If a duplicate local ID sneaks in
1445 // So, check it here!
1446 //
1447 if (!sceneObjects.ContainsKey(obj.LocalId))
1448 sceneObjects.Add(obj.LocalId, obj);
1444 1449
1445 } 1450 }
1446 } 1451 }