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);
|
||||
reader = new XmlTextReader(sr);
|
||||
SceneObjectPart part = SceneObjectPart.FromXml(reader);
|
||||
|
||||
int originalLinkNum = part.LinkNum;
|
||||
|
||||
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();
|
||||
reader.Close();
|
||||
sr.Close();
|
||||
|
|
Loading…
Reference in New Issue