aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-09 03:48:09 +0000
committerMelanie Thielker2008-09-09 03:48:09 +0000
commit3ee91cb3c6d55c67d63c77db0c3cc4febf56eaff (patch)
treed0ce2c48857354ccf7f7bdfd2352cf1b16f1a1a4 /OpenSim/Region/Environment/Scenes
parentUpdate svn properties, formatting cleanup. (diff)
downloadopensim-SC_OLD-3ee91cb3c6d55c67d63c77db0c3cc4febf56eaff.zip
opensim-SC_OLD-3ee91cb3c6d55c67d63c77db0c3cc4febf56eaff.tar.gz
opensim-SC_OLD-3ee91cb3c6d55c67d63c77db0c3cc4febf56eaff.tar.bz2
opensim-SC_OLD-3ee91cb3c6d55c67d63c77db0c3cc4febf56eaff.tar.xz
Preserve link numbers when items are taken into inventory and re-rezzed.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index c049e86..1b2ea8e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -357,13 +357,16 @@ namespace OpenSim.Region.Environment.Scenes
357 xmlData = xmlData.Replace("</Guid></Guid>", "</Guid></UUID>"); 357 xmlData = xmlData.Replace("</Guid></Guid>", "</Guid></UUID>");
358 StringReader sr = new StringReader(xmlData); 358 StringReader sr = new StringReader(xmlData);
359 XmlTextReader reader = new XmlTextReader(sr); 359 XmlTextReader reader = new XmlTextReader(sr);
360
360 try 361 try
361 { 362 {
362 reader.Read(); 363 reader.Read();
363 reader.ReadStartElement("SceneObjectGroup"); 364 reader.ReadStartElement("SceneObjectGroup");
364 reader.ReadStartElement("RootPart"); 365 reader.ReadStartElement("RootPart");
365 m_rootPart = SceneObjectPart.FromXml(reader); 366 m_rootPart = SceneObjectPart.FromXml(reader);
367 int linkNum = m_rootPart.LinkNum;
366 AddPart(m_rootPart); 368 AddPart(m_rootPart);
369 m_rootPart.LinkNum = linkNum;
367 370
368 reader.ReadEndElement(); 371 reader.ReadEndElement();
369 372
@@ -377,7 +380,9 @@ namespace OpenSim.Region.Environment.Scenes
377 reader.Read(); 380 reader.Read();
378 SceneObjectPart part = SceneObjectPart.FromXml(reader); 381 SceneObjectPart part = SceneObjectPart.FromXml(reader);
379 part.LocalId = m_scene.PrimIDAllocate(); 382 part.LocalId = m_scene.PrimIDAllocate();
383 linkNum = part.LinkNum;
380 AddPart(part); 384 AddPart(part);
385 part.LinkNum = linkNum;
381 part.RegionHandle = m_regionHandle; 386 part.RegionHandle = m_regionHandle;
382 387
383 part.TrimPermissions(); 388 part.TrimPermissions();
@@ -1459,7 +1464,7 @@ namespace OpenSim.Region.Environment.Scenes
1459 m_parts.Clear(); 1464 m_parts.Clear();
1460 foreach (SceneObjectPart part in partsList) 1465 foreach (SceneObjectPart part in partsList)
1461 { 1466 {
1462 part.ResetIDs(m_parts.Count); 1467 part.ResetIDs(part.LinkNum); // Don't change link nums
1463 m_parts.Add(part.UUID, part); 1468 m_parts.Add(part.UUID, part);
1464 } 1469 }
1465 } 1470 }