diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 1c72b10..9c06786 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1691,10 +1691,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1691 | if (userExposed) | 1691 | if (userExposed) |
1692 | dupe.UUID = UUID.Random(); | 1692 | dupe.UUID = UUID.Random(); |
1693 | 1693 | ||
1694 | //memberwiseclone means it also clones the physics actor reference | 1694 | // The PhysActor cannot be valid on a copy because the copy is not in the scene yet. |
1695 | // This will make physical prim 'bounce' if not set to null. | 1695 | // Null it, the caller has to create a new one once the object is added to a scene |
1696 | if (!userExposed) | 1696 | dupe.PhysActor = null; |
1697 | dupe.PhysActor = null; | ||
1698 | 1697 | ||
1699 | dupe.OwnerID = AgentID; | 1698 | dupe.OwnerID = AgentID; |
1700 | dupe.GroupID = GroupID; | 1699 | dupe.GroupID = GroupID; |
@@ -1727,8 +1726,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1727 | 1726 | ||
1728 | // Move afterwards ResetIDs as it clears the localID | 1727 | // Move afterwards ResetIDs as it clears the localID |
1729 | dupe.LocalId = localID; | 1728 | dupe.LocalId = localID; |
1730 | if(dupe.PhysActor != null) | ||
1731 | dupe.PhysActor.LocalID = localID; | ||
1732 | 1729 | ||
1733 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. | 1730 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. |
1734 | dupe.LastOwnerID = OwnerID; | 1731 | dupe.LastOwnerID = OwnerID; |
@@ -1749,6 +1746,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1749 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 1746 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
1750 | } | 1747 | } |
1751 | 1748 | ||
1749 | if (dupe.PhysActor != null) | ||
1750 | dupe.PhysActor.LocalID = localID; | ||
1751 | |||
1752 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); | 1752 | ParentGroup.Scene.EventManager.TriggerOnSceneObjectPartCopy(dupe, this, userExposed); |
1753 | 1753 | ||
1754 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); | 1754 | // m_log.DebugFormat("[SCENE OBJECT PART]: Clone of {0} {1} finished", Name, UUID); |