diff options
author | Melanie Thielker | 2008-11-26 07:34:38 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-11-26 07:34:38 +0000 |
commit | 3efdccbb12fc2d5339870ade39e1b1d54da4fe9b (patch) | |
tree | 5fd5d0e9c802da79aed0579718211507945699cc /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | Next step of the PresenceModule. Still not complete; local optimizations and the (diff) | |
download | opensim-SC_OLD-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.zip opensim-SC_OLD-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.tar.gz opensim-SC_OLD-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.tar.bz2 opensim-SC_OLD-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.tar.xz |
Committing the LCO database layer. Native MySQL, no ADO. New reconnect
mechanism to prevent prim loss. Preserve link order on sim restart
and drag copy. Fix drag-copied prims' inventories. Fix persistence
of child prim inventories.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 9839126..7bdcb5c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1336,6 +1336,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1336 | 1336 | ||
1337 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1337 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
1338 | 1338 | ||
1339 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | ||
1340 | |||
1339 | if (userExposed) | 1341 | if (userExposed) |
1340 | dupe.m_rootPart.TrimPermissions(); | 1342 | dupe.m_rootPart.TrimPermissions(); |
1341 | 1343 | ||
@@ -1368,16 +1370,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1368 | } | 1370 | } |
1369 | 1371 | ||
1370 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); | 1372 | List<SceneObjectPart> partList = new List<SceneObjectPart>(m_parts.Values); |
1373 | partList.Sort(delegate(SceneObjectPart p1, SceneObjectPart p2) | ||
1374 | { | ||
1375 | return p1.LinkNum.CompareTo(p2.LinkNum); | ||
1376 | } | ||
1377 | ); | ||
1378 | |||
1371 | foreach (SceneObjectPart part in partList) | 1379 | foreach (SceneObjectPart part in partList) |
1372 | { | 1380 | { |
1373 | if (part.UUID != m_rootPart.UUID) | 1381 | if (part.UUID != m_rootPart.UUID) |
1374 | { | 1382 | { |
1375 | dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1383 | SceneObjectPart newPart = |
1384 | dupe.CopyPart(part, OwnerID, GroupID, userExposed); | ||
1385 | |||
1386 | newPart.LinkNum = part.LinkNum; | ||
1376 | 1387 | ||
1377 | if (userExposed) | 1388 | if (userExposed) |
1378 | { | 1389 | { |
1379 | SetPartOwner(part, cAgentID, cGroupID); | 1390 | SetPartOwner(newPart, cAgentID, cGroupID); |
1380 | part.ScheduleFullUpdate(); | 1391 | newPart.ScheduleFullUpdate(); |
1381 | } | 1392 | } |
1382 | } | 1393 | } |
1383 | } | 1394 | } |
@@ -1507,7 +1518,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1507 | /// <param name="part"></param> | 1518 | /// <param name="part"></param> |
1508 | /// <param name="cAgentID"></param> | 1519 | /// <param name="cAgentID"></param> |
1509 | /// <param name="cGroupID"></param> | 1520 | /// <param name="cGroupID"></param> |
1510 | public void CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) | 1521 | public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) |
1511 | { | 1522 | { |
1512 | SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); | 1523 | SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); |
1513 | newPart.SetParent(this); | 1524 | newPart.SetParent(this); |
@@ -1519,6 +1530,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1519 | 1530 | ||
1520 | SetPartAsNonRoot(newPart); | 1531 | SetPartAsNonRoot(newPart); |
1521 | 1532 | ||
1533 | return newPart; | ||
1522 | } | 1534 | } |
1523 | 1535 | ||
1524 | /// <summary> | 1536 | /// <summary> |