aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-21 21:22:56 +0000
committerTeravus Ovares2008-05-21 21:22:56 +0000
commit5af108a029e5382f6a2f6d4d10b3d4de3a8f5245 (patch)
tree171813c4182af2849052281c1e941dec434e6815 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentimplement in memory appearance cache for sqlite. This (diff)
downloadopensim-SC-5af108a029e5382f6a2f6d4d10b3d4de3a8f5245.zip
opensim-SC-5af108a029e5382f6a2f6d4d10b3d4de3a8f5245.tar.gz
opensim-SC-5af108a029e5382f6a2f6d4d10b3d4de3a8f5245.tar.bz2
opensim-SC-5af108a029e5382f6a2f6d4d10b3d4de3a8f5245.tar.xz
* This update causes the backup process to run in a separate thread.
* Concurrency issues are resolved because each object makes a memory-only copy of itself and backs up the copy. * Because of the way this is done, the latest at the time of the backup gets backed up (no functionality change) * You can move *thousands of objects at a time* and the sim doesn't freeze and wait for the backup to complete. * This can be enhanced more by dedicating the thread as opposed to starting it when the backup process starts.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs22
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index f5d3618..d95143e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1523,12 +1523,14 @@ namespace OpenSim.Region.Environment.Scenes
1523 /// Duplicates this part. 1523 /// Duplicates this part.
1524 /// </summary> 1524 /// </summary>
1525 /// <returns></returns> 1525 /// <returns></returns>
1526 public SceneObjectPart Copy(uint localID, LLUUID AgentID, LLUUID GroupID, int linkNum) 1526 public SceneObjectPart Copy(uint localID, LLUUID AgentID, LLUUID GroupID, int linkNum, bool userExposed)
1527 { 1527 {
1528 SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone(); 1528 SceneObjectPart dupe = (SceneObjectPart) MemberwiseClone();
1529 dupe.m_shape = m_shape.Copy(); 1529 dupe.m_shape = m_shape.Copy();
1530 dupe.m_regionHandle = m_regionHandle; 1530 dupe.m_regionHandle = m_regionHandle;
1531 dupe.UUID = LLUUID.Random(); 1531 if (userExposed)
1532 dupe.UUID = LLUUID.Random();
1533
1532 dupe.LocalId = localID; 1534 dupe.LocalId = localID;
1533 dupe.OwnerID = AgentID; 1535 dupe.OwnerID = AgentID;
1534 dupe.GroupID = GroupID; 1536 dupe.GroupID = GroupID;
@@ -1548,7 +1550,8 @@ namespace OpenSim.Region.Environment.Scenes
1548 1550
1549 dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone(); 1551 dupe.TaskInventory = (TaskInventoryDictionary)dupe.TaskInventory.Clone();
1550 1552
1551 dupe.ResetIDs(linkNum); 1553 if (userExposed)
1554 dupe.ResetIDs(linkNum);
1552 1555
1553 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. 1556 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
1554 dupe.LastOwnerID = ObjectOwner; 1557 dupe.LastOwnerID = ObjectOwner;
@@ -1556,13 +1559,16 @@ namespace OpenSim.Region.Environment.Scenes
1556 byte[] extraP = new byte[Shape.ExtraParams.Length]; 1559 byte[] extraP = new byte[Shape.ExtraParams.Length];
1557 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 1560 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
1558 dupe.Shape.ExtraParams = extraP; 1561 dupe.Shape.ExtraParams = extraP;
1559 if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != LLUUID.Zero) 1562
1563 if (userExposed)
1560 { 1564 {
1561 m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true); 1565 if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != LLUUID.Zero)
1566 {
1567 m_parentGroup.Scene.AssetCache.GetAsset(dupe.m_shape.SculptTexture, dupe.SculptTextureCallback, true);
1568 }
1569 bool UsePhysics = ((dupe.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
1570 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
1562 } 1571 }
1563 bool UsePhysics = ((dupe.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0);
1564 dupe.DoPhysicsPropertyUpdate(UsePhysics, true);
1565
1566 return dupe; 1572 return dupe;
1567 } 1573 }
1568 1574