aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
authorMelanie2010-09-14 22:03:42 +0100
committerMelanie2010-09-14 22:03:42 +0100
commit1212cb0c7442619f47f3937d0d8b7ed0ee5f6090 (patch)
tree776d0ff51f06ad2a30dbbacb7ddfd183766f0344 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
parentFix a small left over buglet and also add checking of the physics actor (diff)
parentFix "show threads" to show threads now being managed by OpenSim.Framework.Wat... (diff)
downloadopensim-SC-1212cb0c7442619f47f3937d0d8b7ed0ee5f6090.zip
opensim-SC-1212cb0c7442619f47f3937d0d8b7ed0ee5f6090.tar.gz
opensim-SC-1212cb0c7442619f47f3937d0d8b7ed0ee5f6090.tar.bz2
opensim-SC-1212cb0c7442619f47f3937d0d8b7ed0ee5f6090.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs30
1 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index e1c0949..5378930 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
191 itemID = group.GetFromItemID(); 191 itemID = group.GetFromItemID();
192 } 192 }
193 193
194 SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); 194 ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
195 195
196 AttachToAgent(sp, group, AttachmentPt, attachPos, silent); 196 AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
197 } 197 }
@@ -219,8 +219,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
219 219
220 public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 220 public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
221 { 221 {
222 m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name);
223
224 return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true); 222 return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true);
225 } 223 }
226 224
@@ -238,11 +236,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
238 if (updateInventoryStatus) 236 if (updateInventoryStatus)
239 { 237 {
240 if (att == null) 238 if (att == null)
241 {
242 ShowDetachInUserInventory(itemID, remoteClient); 239 ShowDetachInUserInventory(itemID, remoteClient);
243 } 240 else
244 241 ShowAttachInUserInventory(att, remoteClient, itemID, AttachmentPt);
245 SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
246 } 242 }
247 243
248 if (null == att) 244 if (null == att)
@@ -313,12 +309,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
313 return null; 309 return null;
314 } 310 }
315 311
316 public UUID SetAttachmentInventoryStatus( 312 /// <summary>
313 /// Update the user inventory to the attachment of an item
314 /// </summary>
315 /// <param name="att"></param>
316 /// <param name="remoteClient"></param>
317 /// <param name="itemID"></param>
318 /// <param name="AttachmentPt"></param>
319 /// <returns></returns>
320 protected UUID ShowAttachInUserInventory(
317 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 321 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
318 { 322 {
319 m_log.DebugFormat( 323// m_log.DebugFormat(
320 "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", 324// "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
321 remoteClient.Name, att.Name, itemID); 325// remoteClient.Name, att.Name, itemID);
322 326
323 if (!att.IsDeleted) 327 if (!att.IsDeleted)
324 AttachmentPt = att.RootPart.AttachmentPoint; 328 AttachmentPt = att.RootPart.AttachmentPoint;
@@ -343,7 +347,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
343 /// <param name="AttachmentPt"></param> 347 /// <param name="AttachmentPt"></param>
344 /// <param name="itemID"></param> 348 /// <param name="itemID"></param>
345 /// <param name="att"></param> 349 /// <param name="att"></param>
346 public void SetAttachmentInventoryStatus( 350 protected void ShowAttachInUserInventory(
347 IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) 351 IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
348 { 352 {
349// m_log.DebugFormat( 353// m_log.DebugFormat(
@@ -407,7 +411,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
407 // Save avatar attachment information 411 // Save avatar attachment information
408 if (m_scene.AvatarFactory != null) 412 if (m_scene.AvatarFactory != null)
409 { 413 {
410 m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); 414 m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
411 m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); 415 m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
412 } 416 }
413 } 417 }