diff options
author | justincc | 2010-12-15 00:35:36 +0000 |
---|---|---|
committer | justincc | 2010-12-15 00:35:36 +0000 |
commit | b643661938881af6fc782d39e52040ed6d16f03f (patch) | |
tree | 162e0667718b2f68e5f4e90cd10f30e6fa374cbb /OpenSim/Region/CoreModules/Avatar/Attachments | |
parent | replace ode.dll with one built without asserts turned on (diff) | |
parent | fix mistake in last change of local.include (diff) | |
download | opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.zip opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.gz opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.bz2 opensim-SC_OLD-b643661938881af6fc782d39e52040ed6d16f03f.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 16 |
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> |