From 911e63765c7cea748b5ae2227f5c1d6ff131d329 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 27 Apr 2008 20:10:28 +0000 Subject: * 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. --- OpenSim/Region/ClientStack/ClientView.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/ClientView.cs') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index fb9d638..94de013 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -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; @@ -3442,6 +3444,18 @@ namespace OpenSim.Region.ClientStack } 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); + } } } -- cgit v1.1