aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-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