diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8e886d4..e711afb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -475,6 +475,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
475 | 475 | ||
476 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId) | 476 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId) |
477 | { | 477 | { |
478 | DetachSingleAttachmentToGround(sp, soLocalId, sp.AbsolutePosition, Quaternion.Identity); | ||
479 | } | ||
480 | |||
481 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot) | ||
482 | { | ||
478 | if (!Enabled) | 483 | if (!Enabled) |
479 | return; | 484 | return; |
480 | 485 | ||
@@ -516,7 +521,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
516 | so.FromItemID = UUID.Zero; | 521 | so.FromItemID = UUID.Zero; |
517 | 522 | ||
518 | SceneObjectPart rootPart = so.RootPart; | 523 | SceneObjectPart rootPart = so.RootPart; |
519 | so.AbsolutePosition = sp.AbsolutePosition; | 524 | so.AbsolutePosition = absolutePos; |
525 | if (absoluteRot != Quaternion.Identity) | ||
526 | { | ||
527 | so.UpdateGroupRotationR(absoluteRot); | ||
528 | } | ||
520 | so.AttachedAvatar = UUID.Zero; | 529 | so.AttachedAvatar = UUID.Zero; |
521 | rootPart.SetParentLocalId(0); | 530 | rootPart.SetParentLocalId(0); |
522 | so.ClearPartAttachmentData(); | 531 | so.ClearPartAttachmentData(); |