diff options
author | Melanie | 2012-10-03 00:24:33 +0100 |
---|---|---|
committer | Melanie | 2012-10-03 00:24:33 +0100 |
commit | 23d5bafa7f5e7b23ea36300de8096c7dc84e51b0 (patch) | |
tree | 044eb97d800f1ce82bfb0367488eb8752b3e6aa6 /OpenSim/Region/CoreModules/Avatar | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-23d5bafa7f5e7b23ea36300de8096c7dc84e51b0.zip opensim-SC_OLD-23d5bafa7f5e7b23ea36300de8096c7dc84e51b0.tar.gz opensim-SC_OLD-23d5bafa7f5e7b23ea36300de8096c7dc84e51b0.tar.bz2 opensim-SC_OLD-23d5bafa7f5e7b23ea36300de8096c7dc84e51b0.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 39 |
2 files changed, 49 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8e886d4..e711afb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -475,6 +475,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
475 | 475 | ||
476 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId) | 476 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId) |
477 | { | 477 | { |
478 | DetachSingleAttachmentToGround(sp, soLocalId, sp.AbsolutePosition, Quaternion.Identity); | ||
479 | } | ||
480 | |||
481 | public void DetachSingleAttachmentToGround(IScenePresence sp, uint soLocalId, Vector3 absolutePos, Quaternion absoluteRot) | ||
482 | { | ||
478 | if (!Enabled) | 483 | if (!Enabled) |
479 | return; | 484 | return; |
480 | 485 | ||
@@ -516,7 +521,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
516 | so.FromItemID = UUID.Zero; | 521 | so.FromItemID = UUID.Zero; |
517 | 522 | ||
518 | SceneObjectPart rootPart = so.RootPart; | 523 | SceneObjectPart rootPart = so.RootPart; |
519 | so.AbsolutePosition = sp.AbsolutePosition; | 524 | so.AbsolutePosition = absolutePos; |
525 | if (absoluteRot != Quaternion.Identity) | ||
526 | { | ||
527 | so.UpdateGroupRotationR(absoluteRot); | ||
528 | } | ||
520 | so.AttachedAvatar = UUID.Zero; | 529 | so.AttachedAvatar = UUID.Zero; |
521 | rootPart.SetParentLocalId(0); | 530 | rootPart.SetParentLocalId(0); |
522 | so.ClearPartAttachmentData(); | 531 | so.ClearPartAttachmentData(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 81de29c..c14cb17 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -313,6 +313,45 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
313 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); | 313 | m_TransferModule.SendInstantMessage(im, delegate(bool success) {}); |
314 | } | 314 | } |
315 | } | 315 | } |
316 | else if (im.dialog == (byte) InstantMessageDialog.TaskInventoryAccepted) | ||
317 | { | ||
318 | UUID destinationFolderID = UUID.Zero; | ||
319 | |||
320 | if (im.binaryBucket != null && im.binaryBucket.Length >= 16) | ||
321 | { | ||
322 | destinationFolderID = new UUID(im.binaryBucket, 0); | ||
323 | } | ||
324 | |||
325 | if (destinationFolderID != UUID.Zero) | ||
326 | { | ||
327 | IInventoryService invService = scene.InventoryService; | ||
328 | |||
329 | UUID inventoryID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip | ||
330 | |||
331 | InventoryItemBase item = new InventoryItemBase(inventoryID, client.AgentId); | ||
332 | item = invService.GetItem(item); | ||
333 | InventoryFolderBase folder = null; | ||
334 | |||
335 | if (item != null) // It's an item | ||
336 | { | ||
337 | item.Folder = destinationFolderID; | ||
338 | |||
339 | invService.DeleteItems(item.Owner, new List<UUID>() { item.ID }); | ||
340 | scene.AddInventoryItem(client, item); | ||
341 | } | ||
342 | else | ||
343 | { | ||
344 | folder = new InventoryFolderBase(inventoryID, client.AgentId); | ||
345 | folder = invService.GetFolder(folder); | ||
346 | |||
347 | if (folder != null) // It's a folder | ||
348 | { | ||
349 | folder.ParentID = destinationFolderID; | ||
350 | invService.MoveFolder(folder); | ||
351 | } | ||
352 | } | ||
353 | } | ||
354 | } | ||
316 | else if ( | 355 | else if ( |
317 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined | 356 | im.dialog == (byte)InstantMessageDialog.InventoryDeclined |
318 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) | 357 | || im.dialog == (byte)InstantMessageDialog.TaskInventoryDeclined) |