mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
* 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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user