mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
implementing osDropAttachment & osDropAttachmentAt
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
e81e19a3b4
commit
35b7c80e0b
@@ -406,6 +406,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
}
|
||||
|
||||
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId)
|
||||
{
|
||||
DetachSingleAttachmentToGround(sp, soLocalId, sp.AbsolutePosition, Quaternion.Identity);
|
||||
}
|
||||
|
||||
public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
@@ -448,7 +453,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
so.FromItemID = UUID.Zero;
|
||||
|
||||
SceneObjectPart rootPart = so.RootPart;
|
||||
so.AbsolutePosition = sp.AbsolutePosition;
|
||||
so.AbsolutePosition = absolutePos;
|
||||
if (absoluteRot != Quaternion.Identity)
|
||||
{
|
||||
so.UpdateGroupRotationR(absoluteRot);
|
||||
}
|
||||
so.AttachedAvatar = UUID.Zero;
|
||||
rootPart.SetParentLocalId(0);
|
||||
so.ClearPartAttachmentData();
|
||||
|
||||
Reference in New Issue
Block a user