aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-12 08:29:20 +0200
committerMelanie2010-06-12 08:28:00 +0100
commit3c036934a3f017e1444dcc4a05e946076345f59d (patch)
treea7c46c14d03754499eca46c6e46c6c9177f3dace /OpenSim/Region
parentMake local teleports send CHANGED_TELEPORT (diff)
downloadopensim-SC-3c036934a3f017e1444dcc4a05e946076345f59d.zip
opensim-SC-3c036934a3f017e1444dcc4a05e946076345f59d.tar.gz
opensim-SC-3c036934a3f017e1444dcc4a05e946076345f59d.tar.bz2
opensim-SC-3c036934a3f017e1444dcc4a05e946076345f59d.tar.xz
Preserving the link numbers is a serializer's highest duty.
Prevent region crossings from screwing up complex attachments by preserving link numbers.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index f7544ac..5bdaa17 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -221,7 +221,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
221 sr = new StringReader(parts[i].OuterXml); 221 sr = new StringReader(parts[i].OuterXml);
222 reader = new XmlTextReader(sr); 222 reader = new XmlTextReader(sr);
223 SceneObjectPart part = SceneObjectPart.FromXml(reader); 223 SceneObjectPart part = SceneObjectPart.FromXml(reader);
224
225 int originalLinkNum = part.LinkNum;
226
224 sceneObject.AddPart(part); 227 sceneObject.AddPart(part);
228
229 // SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum.
230 // We override that here
231 if (originalLinkNum != 0)
232 part.LinkNum = originalLinkNum;
233
225 part.StoreUndoState(); 234 part.StoreUndoState();
226 reader.Close(); 235 reader.Close();
227 sr.Close(); 236 sr.Close();