aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 5661254..928d43f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -230,7 +230,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
230 230
231 itemID = group.GetFromItemID(); 231 itemID = group.GetFromItemID();
232 if (itemID == UUID.Zero) 232 if (itemID == UUID.Zero)
233 AddSceneObjectAsAttachment(sp.ControllingClient, group, out itemID); 233 itemID = AddSceneObjectAsAttachment(sp.ControllingClient, group).ID;
234 234
235 ShowAttachInUserInventory(sp, AttachmentPt, itemID, group); 235 ShowAttachInUserInventory(sp, AttachmentPt, itemID, group);
236 236
@@ -664,14 +664,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
664 /// </summary> 664 /// </summary>
665 /// <param name="remoteClient"></param> 665 /// <param name="remoteClient"></param>
666 /// <param name="grp"></param> 666 /// <param name="grp"></param>
667 /// <param name="itemID"></param> 667 /// <returns>The user inventory item created that holds the attachment.</returns>
668 /// <returns></returns> 668 private InventoryItemBase AddSceneObjectAsAttachment(IClientAPI remoteClient, SceneObjectGroup grp)
669 private UUID AddSceneObjectAsAttachment(IClientAPI remoteClient, SceneObjectGroup grp, out UUID itemID)
670 { 669 {
671// m_log.DebugFormat("[SCENE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2} {3} {4}", grp.Name, grp.LocalId, remoteClient.Name, remoteClient.AgentId, AgentId); 670// m_log.DebugFormat("[SCENE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2} {3} {4}", grp.Name, grp.LocalId, remoteClient.Name, remoteClient.AgentId, AgentId);
672 671
673 itemID = UUID.Zero;
674
675 Vector3 inventoryStoredPosition = new Vector3 672 Vector3 inventoryStoredPosition = new Vector3
676 (((grp.AbsolutePosition.X > (int)Constants.RegionSize) 673 (((grp.AbsolutePosition.X > (int)Constants.RegionSize)
677 ? Constants.RegionSize - 6 674 ? Constants.RegionSize - 6
@@ -751,8 +748,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
751 m_dialogModule.SendAlertToUser(remoteClient, "Operation failed"); 748 m_dialogModule.SendAlertToUser(remoteClient, "Operation failed");
752 } 749 }
753 750
754 itemID = item.ID; 751 return item;
755 return item.AssetID;
756 } 752 }
757 } 753 }
758} 754}