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/Region/Environment/Scenes/Scene.cs | |
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 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 8 |
1 files changed, 8 insertions, 0 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); |