diff options
author | Diva Canto | 2010-06-29 06:37:39 -0700 |
---|---|---|
committer | Diva Canto | 2010-06-29 06:37:39 -0700 |
commit | 1cd9118c7a72a6e80aafe56134630682f2bb04d0 (patch) | |
tree | 09f953b9b6150ea29153917b2c159fa621a1cf66 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | don't report the null uuid as a missing asset on saving oars/iars (diff) | |
parent | This file wants to be committed. (diff) | |
download | opensim-SC-1cd9118c7a72a6e80aafe56134630682f2bb04d0.zip opensim-SC-1cd9118c7a72a6e80aafe56134630682f2bb04d0.tar.gz opensim-SC-1cd9118c7a72a6e80aafe56134630682f2bb04d0.tar.bz2 opensim-SC-1cd9118c7a72a6e80aafe56134630682f2bb04d0.tar.xz |
Merge branch 'master' into 0.7-post-fixes
Conflicts:
OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e23f39f..1ca390a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1472,7 +1472,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1472 | "[SCENE]: Storing {0}, {1} in {2}", | 1472 | "[SCENE]: Storing {0}, {1} in {2}", |
1473 | Name, UUID, m_scene.RegionInfo.RegionName); | 1473 | Name, UUID, m_scene.RegionInfo.RegionName); |
1474 | 1474 | ||
1475 | SceneObjectGroup backup_group = Copy(OwnerID, GroupID, false); | 1475 | SceneObjectGroup backup_group = Copy(false); |
1476 | backup_group.RootPart.Velocity = RootPart.Velocity; | 1476 | backup_group.RootPart.Velocity = RootPart.Velocity; |
1477 | backup_group.RootPart.Acceleration = RootPart.Acceleration; | 1477 | backup_group.RootPart.Acceleration = RootPart.Acceleration; |
1478 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; | 1478 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; |
@@ -1528,7 +1528,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1528 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. | 1528 | /// Duplicates this object, including operations such as physics set up and attaching to the backup event. |
1529 | /// </summary> | 1529 | /// </summary> |
1530 | /// <returns></returns> | 1530 | /// <returns></returns> |
1531 | public SceneObjectGroup Copy(UUID cAgentID, UUID cGroupID, bool userExposed) | 1531 | public SceneObjectGroup Copy(bool userExposed) |
1532 | { | 1532 | { |
1533 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); | 1533 | SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); |
1534 | dupe.m_isBackedUp = false; | 1534 | dupe.m_isBackedUp = false; |
@@ -1551,7 +1551,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1551 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); | 1551 | dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); |
1552 | 1552 | ||
1553 | if (!userExposed) | 1553 | if (!userExposed) |
1554 | { | ||
1554 | dupe.RootPart.IsAttachment = previousAttachmentStatus; | 1555 | dupe.RootPart.IsAttachment = previousAttachmentStatus; |
1556 | } | ||
1555 | 1557 | ||
1556 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); | 1558 | dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); |
1557 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; | 1559 | dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; |
@@ -1576,16 +1578,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1576 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); | 1578 | dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); |
1577 | } | 1579 | } |
1578 | 1580 | ||
1579 | // Now we've made a copy that replaces this one, we need to | ||
1580 | // switch the owner to the person who did the copying | ||
1581 | // Second Life copies an object and duplicates the first one in it's place | ||
1582 | // So, we have to make a copy of this one, set it in it's place then set the owner on this one | ||
1583 | if (userExposed) | ||
1584 | { | ||
1585 | SetRootPartOwner(m_rootPart, cAgentID, cGroupID); | ||
1586 | m_rootPart.ScheduleFullUpdate(); | ||
1587 | } | ||
1588 | |||
1589 | List<SceneObjectPart> partList; | 1581 | List<SceneObjectPart> partList; |
1590 | 1582 | ||
1591 | lock (m_parts) | 1583 | lock (m_parts) |
@@ -1606,12 +1598,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1606 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1598 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1607 | 1599 | ||
1608 | newPart.LinkNum = part.LinkNum; | 1600 | newPart.LinkNum = part.LinkNum; |
1609 | |||
1610 | if (userExposed) | ||
1611 | { | ||
1612 | SetPartOwner(newPart, cAgentID, cGroupID); | ||
1613 | newPart.ScheduleFullUpdate(); | ||
1614 | } | ||
1615 | } | 1601 | } |
1616 | } | 1602 | } |
1617 | 1603 | ||
@@ -3595,7 +3581,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3595 | 3581 | ||
3596 | public virtual ISceneObject CloneForNewScene() | 3582 | public virtual ISceneObject CloneForNewScene() |
3597 | { | 3583 | { |
3598 | SceneObjectGroup sog = Copy(this.OwnerID, this.GroupID, false); | 3584 | SceneObjectGroup sog = Copy(false); |
3599 | sog.m_isDeleted = false; | 3585 | sog.m_isDeleted = false; |
3600 | return sog; | 3586 | return sog; |
3601 | } | 3587 | } |