* Single Attachments now work from inventory. You can attach from inventory and detach from inventory.

* Detaching from right clicking in world, detaches to your inventory.
* If you go up to a prim and attach it from in world, it appears in your inventory.
* Attachment placement is saved when you detach them. 
* Choosing wear remembers your last attachment point from inventory.
* Wrote a method to update an inventory item's asset and sends the updated inventory item to the Client
* Wrote a recursive method to find the folder of a known existing inventory item.
* Removed a block on physics object position on creation.  This might crash a region or two, let us know via Mantis if your region crashes because of a physics out of bounds error.
* Drop doesn't work.  The menu item doesn't even come up.  Don't know why :P.
This commit is contained in:
Teravus Ovares
2008-04-27 20:10:28 +00:00
parent 56497c9615
commit 911e63765c
10 changed files with 241 additions and 34 deletions

View File

@@ -663,9 +663,11 @@ namespace OpenSim.Region.Environment.Scenes
{
m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
m_rootPart.PhysActor = null;
AbsolutePosition = AttachOffset;
m_rootPart.m_attachedPos = AttachOffset;
}
AbsolutePosition = AttachOffset;
m_rootPart.m_attachedPos = AttachOffset;
m_rootPart.m_IsAttachment = true;
m_rootPart.SetParentLocalId(avatar.LocalId);
@@ -702,6 +704,26 @@ namespace OpenSim.Region.Environment.Scenes
AttachToBackup();
m_rootPart.ScheduleFullUpdate();
}
public void DetachToInventoryPrep()
{
ScenePresence avatar = m_scene.GetScenePresence(m_rootPart.m_attachedAvatar);
//LLVector3 detachedpos = new LLVector3(127f, 127f, 127f);
if (avatar != null)
{
//detachedpos = avatar.AbsolutePosition;
avatar.RemoveAttachment(this);
}
m_rootPart.m_attachedAvatar = LLUUID.Zero;
m_rootPart.SetParentLocalId(0);
//m_rootPart.SetAttachmentPoint((byte)0);
m_rootPart.m_IsAttachment = false;
AbsolutePosition = m_rootPart.m_attachedPos;
//m_rootPart.ApplyPhysics(m_rootPart.ObjectFlags, m_scene.m_physicalPrim);
//AttachToBackup();
//m_rootPart.ScheduleFullUpdate();
}
/// <summary>
///
/// </summary>