diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 15349e3..ca6f457 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2560,11 +2560,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2560 | /// <param name="cGroupID"></param> | 2560 | /// <param name="cGroupID"></param> |
2561 | public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) | 2561 | public SceneObjectPart CopyPart(SceneObjectPart part, UUID cAgentID, UUID cGroupID, bool userExposed) |
2562 | { | 2562 | { |
2563 | // give new ID to the new part, letting old keep original | ||
2564 | // SceneObjectPart newPart = part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, m_parts.Count, userExposed); | ||
2565 | SceneObjectPart newPart = part.Copy(part.LocalId, OwnerID, GroupID, m_parts.Count, userExposed); | 2563 | SceneObjectPart newPart = part.Copy(part.LocalId, OwnerID, GroupID, m_parts.Count, userExposed); |
2566 | newPart.LocalId = m_scene.AllocateLocalId(); | 2564 | newPart.LocalId = m_scene.AllocateLocalId(); |
2567 | newPart.SetParent(this); | ||
2568 | 2565 | ||
2569 | AddPart(newPart); | 2566 | AddPart(newPart); |
2570 | 2567 | ||
@@ -2977,6 +2974,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2977 | m_parts.Add(linkPart.UUID, linkPart); | 2974 | m_parts.Add(linkPart.UUID, linkPart); |
2978 | 2975 | ||
2979 | linkPart.SetParent(this); | 2976 | linkPart.SetParent(this); |
2977 | m_scene.updateScenePartGroup(linkPart, this); | ||
2978 | |||
2980 | linkPart.CreateSelected = true; | 2979 | linkPart.CreateSelected = true; |
2981 | 2980 | ||
2982 | // let physics know preserve part volume dtc messy since UpdatePrimFlags doesn't look to parent changes for now | 2981 | // let physics know preserve part volume dtc messy since UpdatePrimFlags doesn't look to parent changes for now |
@@ -3178,9 +3177,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3178 | 3177 | ||
3179 | m_scene.AddNewSceneObject(objectGroup, true); | 3178 | m_scene.AddNewSceneObject(objectGroup, true); |
3180 | 3179 | ||
3181 | if (sendEvents) | ||
3182 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | ||
3183 | |||
3184 | linkPart.Rezzed = RootPart.Rezzed; | 3180 | linkPart.Rezzed = RootPart.Rezzed; |
3185 | 3181 | ||
3186 | // When we delete a group, we currently have to force persist to the database if the object id has changed | 3182 | // When we delete a group, we currently have to force persist to the database if the object id has changed |
@@ -3195,6 +3191,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3195 | 3191 | ||
3196 | objectGroup.HasGroupChangedDueToDelink = true; | 3192 | objectGroup.HasGroupChangedDueToDelink = true; |
3197 | 3193 | ||
3194 | if (sendEvents) | ||
3195 | linkPart.TriggerScriptChangedEvent(Changed.LINK); | ||
3196 | |||
3198 | return objectGroup; | 3197 | return objectGroup; |
3199 | } | 3198 | } |
3200 | 3199 | ||
@@ -3238,9 +3237,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3238 | part.SetParent(this); | 3237 | part.SetParent(this); |
3239 | part.ParentID = m_rootPart.LocalId; | 3238 | part.ParentID = m_rootPart.LocalId; |
3240 | m_parts.Add(part.UUID, part); | 3239 | m_parts.Add(part.UUID, part); |
3240 | |||
3241 | 3241 | ||
3242 | part.LinkNum = linkNum; | 3242 | part.LinkNum = linkNum; |
3243 | 3243 | ||
3244 | m_scene.updateScenePartGroup(part, this); | ||
3245 | |||
3244 | // Compute the new position of this SOP relative to the group position | 3246 | // Compute the new position of this SOP relative to the group position |
3245 | part.OffsetPosition = newPos - AbsolutePosition; | 3247 | part.OffsetPosition = newPos - AbsolutePosition; |
3246 | 3248 | ||