aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 1f49a01..360a014 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -484,6 +484,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
484 } 484 }
485 } 485 }
486 486
487 public void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos)
488 {
489 // First we save the
490 // attachment point information, then we update the relative
491 // positioning. Then we have to mark the object as NOT an
492 // attachment. This is necessary in order to correctly save
493 // and retrieve GroupPosition information for the attachment.
494 // Finally, we restore the object's attachment status.
495 byte attachmentPoint = sog.GetAttachmentPoint();
496 sog.UpdateGroupPosition(pos);
497 sog.RootPart.IsAttachment = false;
498 sog.AbsolutePosition = sog.RootPart.AttachedPos;
499 sog.SetAttachmentPoint(attachmentPoint);
500 sog.HasGroupChanged = true;
501 }
502
487 /// <summary> 503 /// <summary>
488 /// Update the attachment asset for the new sog details if they have changed. 504 /// Update the attachment asset for the new sog details if they have changed.
489 /// </summary> 505 /// </summary>