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 | |
parent | Next step of the PresenceModule. Still not complete; local optimizations and the (diff) | |
download | opensim-SC-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.zip opensim-SC-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.tar.gz opensim-SC-3efdccbb12fc2d5339870ade39e1b1d54da4fe9b.tar.bz2 opensim-SC-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 '')
3 files changed, 31 insertions, 7 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> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e97b99f..5b494d3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1263,10 +1263,18 @@ if (m_shape != null) { | |||
1263 | dupe._category = _category; | 1263 | dupe._category = _category; |
1264 | dupe.m_rezzed = m_rezzed; | 1264 | dupe.m_rezzed = m_rezzed; |
1265 | 1265 | ||
1266 | dupe.m_inventory.Items = (TaskInventoryDictionary)dupe.m_inventory.Items.Clone(); | 1266 | dupe.m_inventory = new SceneObjectPartInventory(dupe); |
1267 | dupe.m_inventory.Items = (TaskInventoryDictionary)m_inventory.Items.Clone(); | ||
1267 | 1268 | ||
1268 | if (userExposed) | 1269 | if (userExposed) |
1270 | { | ||
1269 | dupe.ResetIDs(linkNum); | 1271 | dupe.ResetIDs(linkNum); |
1272 | dupe.m_inventory.HasInventoryChanged = true; | ||
1273 | } | ||
1274 | else | ||
1275 | { | ||
1276 | dupe.m_inventory.HasInventoryChanged = m_inventory.HasInventoryChanged; | ||
1277 | } | ||
1270 | 1278 | ||
1271 | // Move afterwards ResetIDs as it clears the localID | 1279 | // Move afterwards ResetIDs as it clears the localID |
1272 | dupe.LocalId = localID; | 1280 | dupe.LocalId = localID; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs index ae43c5e..3f94a7e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs | |||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
64 | /// <summary> | 64 | /// <summary> |
65 | /// Tracks whether inventory has changed since the last persistent backup | 65 | /// Tracks whether inventory has changed since the last persistent backup |
66 | /// </summary> | 66 | /// </summary> |
67 | protected bool HasInventoryChanged; | 67 | internal bool HasInventoryChanged; |
68 | 68 | ||
69 | /// <value> | 69 | /// <value> |
70 | /// Inventory serial number | 70 | /// Inventory serial number |
@@ -81,7 +81,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
81 | protected internal TaskInventoryDictionary Items | 81 | protected internal TaskInventoryDictionary Items |
82 | { | 82 | { |
83 | get { return m_items; } | 83 | get { return m_items; } |
84 | set { m_items = value; } | 84 | set |
85 | { | ||
86 | m_items = value; | ||
87 | m_inventorySerial++; | ||
88 | } | ||
85 | } | 89 | } |
86 | 90 | ||
87 | /// <summary> | 91 | /// <summary> |