diff options
author | Melanie Thielker | 2008-11-28 03:28:39 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-28 03:28:39 +0000 |
commit | 3ff34579e4813cb0568503bdbe62a40eb964e442 (patch) | |
tree | a2764401f729542aef1fbf00fcefb478b194cbd8 /OpenSim | |
parent | Invert a test to allow prims to region-cross again (diff) | |
download | opensim-SC_OLD-3ff34579e4813cb0568503bdbe62a40eb964e442.zip opensim-SC_OLD-3ff34579e4813cb0568503bdbe62a40eb964e442.tar.gz opensim-SC_OLD-3ff34579e4813cb0568503bdbe62a40eb964e442.tar.bz2 opensim-SC_OLD-3ff34579e4813cb0568503bdbe62a40eb964e442.tar.xz |
Force regioncrossed prims to get a new LocalID. Reset parent local ID to new
avatar local ID when corssing.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneGraph.cs | 7 |
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 | } |