aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
authorMelanie Thielker2010-06-12 08:29:20 +0200
committerMelanie Thielker2010-06-12 08:29:20 +0200
commit03a48f87e418e79ca780b29a696e5e878213e7ef (patch)
tree587df04ec25850f86144f302ad372fa2dd7210dd /OpenSim/Region/Framework/Scenes/Serialization
parentMake local teleports send CHANGED_TELEPORT (diff)
downloadopensim-SC-03a48f87e418e79ca780b29a696e5e878213e7ef.zip
opensim-SC-03a48f87e418e79ca780b29a696e5e878213e7ef.tar.gz
opensim-SC-03a48f87e418e79ca780b29a696e5e878213e7ef.tar.bz2
opensim-SC-03a48f87e418e79ca780b29a696e5e878213e7ef.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/Framework/Scenes/Serialization')
-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();