* 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

@@ -145,6 +145,7 @@ namespace OpenSim.Region.ClientStack
private SetAppearance handlerSetAppearance = null; //OnSetAppearance;
private AvatarNowWearing handlerAvatarNowWearing = null; //OnAvatarNowWearing;
private RezSingleAttachmentFromInv handlerRezSingleAttachment = null; //OnRezSingleAttachmentFromInv;
private UUIDNameRequest handlerDetachAttachmentIntoInv = null; // Detach attachment!
private ObjectAttach handlerObjectAttach = null; //OnObjectAttach;
private SetAlwaysRun handlerSetAlwaysRun = null; //OnSetAlwaysRun;
private GenericCall2 handlerCompleteMovementToRegion = null; //OnCompleteMovementToRegion;
@@ -690,6 +691,7 @@ namespace OpenSim.Region.ClientStack
public event SetAppearance OnSetAppearance;
public event AvatarNowWearing OnAvatarNowWearing;
public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
public event UUIDNameRequest OnDetachAttachmentIntoInv;
public event ObjectAttach OnObjectAttach;
public event ObjectDeselect OnObjectDetach;
public event GenericCall2 OnCompleteMovementToRegion;
@@ -3441,6 +3443,18 @@ namespace OpenSim.Region.ClientStack
rez.ObjectData.AttachmentPt, rez.ObjectData.ItemFlags, rez.ObjectData.NextOwnerMask);
}
break;
case PacketType.DetachAttachmentIntoInv:
handlerDetachAttachmentIntoInv = OnDetachAttachmentIntoInv;
if (handlerDetachAttachmentIntoInv != null)
{
DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack;
LLUUID itemID = detachtoInv.ObjectData.ItemID;
LLUUID ATTACH_agentID = detachtoInv.ObjectData.AgentID;
handlerDetachAttachmentIntoInv(itemID, this);
}
break;
case PacketType.ObjectAttach:
if (OnObjectAttach != null)
@@ -3451,7 +3465,10 @@ namespace OpenSim.Region.ClientStack
if (handlerObjectAttach != null)
{
handlerObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation);
if (att.ObjectData.Length > 0)
{
handlerObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation);
}
}
}