aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 847a999..b3811bf 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -455,5 +455,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
455 } 455 }
456 } 456 }
457 } 457 }
458
459 public void UpdateAttachmentPosition(IClientAPI client, SceneObjectGroup sog, Vector3 pos)
460 {
461 // If this is an attachment, then we need to save the modified
462 // object back into the avatar's inventory. First we save the
463 // attachment point information, then we update the relative
464 // positioning (which caused this method to get driven in the
465 // first place. Then we have to mark the object as NOT an
466 // attachment. This is necessary in order to correctly save
467 // and retrieve GroupPosition information for the attachment.
468 // Then we save the asset back into the appropriate inventory
469 // entry. Finally, we restore the object's attachment status.
470 byte attachmentPoint = sog.GetAttachmentPoint();
471 sog.UpdateGroupPosition(pos);
472 sog.RootPart.IsAttachment = false;
473 sog.AbsolutePosition = sog.RootPart.AttachedPos;
474 m_scene.UpdateKnownItem(client, sog, sog.GetFromItemID(), sog.OwnerID);
475 sog.SetAttachmentPoint(attachmentPoint);
476 }
458 } 477 }
459} 478} \ No newline at end of file