Preserving the link numbers is a serializer's highest duty.
Prevent region crossings from screwing up complex attachments by preserving link numbers.avinationmerge
parent
e337c9130f
commit
03a48f87e4
|
@ -221,7 +221,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
sr = new StringReader(parts[i].OuterXml);
|
sr = new StringReader(parts[i].OuterXml);
|
||||||
reader = new XmlTextReader(sr);
|
reader = new XmlTextReader(sr);
|
||||||
SceneObjectPart part = SceneObjectPart.FromXml(reader);
|
SceneObjectPart part = SceneObjectPart.FromXml(reader);
|
||||||
|
|
||||||
|
int originalLinkNum = part.LinkNum;
|
||||||
|
|
||||||
sceneObject.AddPart(part);
|
sceneObject.AddPart(part);
|
||||||
|
|
||||||
|
// SceneObjectGroup.AddPart() tries to be smart and automatically set the LinkNum.
|
||||||
|
// We override that here
|
||||||
|
if (originalLinkNum != 0)
|
||||||
|
part.LinkNum = originalLinkNum;
|
||||||
|
|
||||||
part.StoreUndoState();
|
part.StoreUndoState();
|
||||||
reader.Close();
|
reader.Close();
|
||||||
sr.Close();
|
sr.Close();
|
||||||
|
|
Loading…
Reference in New Issue