diff options
author | Tom | 2011-09-14 18:46:42 -0700 |
---|---|---|
committer | Tom | 2011-09-14 18:46:42 -0700 |
commit | cda4cd6b551156ed503a5f284ad6c5a9a0e1c5a5 (patch) | |
tree | f6b8e5a8dbe7d00c1ac1ba1c830c0f8cea4e1325 /OpenSim/Region/CoreModules/Avatar | |
parent | First set of merge fixes (diff) | |
download | opensim-SC_OLD-cda4cd6b551156ed503a5f284ad6c5a9a0e1c5a5.zip opensim-SC_OLD-cda4cd6b551156ed503a5f284ad6c5a9a0e1c5a5.tar.gz opensim-SC_OLD-cda4cd6b551156ed503a5f284ad6c5a9a0e1c5a5.tar.bz2 opensim-SC_OLD-cda4cd6b551156ed503a5f284ad6c5a9a0e1c5a5.tar.xz |
Merge fixes, and fix the build
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8be0455..218b7b8 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -131,7 +131,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
131 | // If we're an NPC then skip all the item checks and manipulations since we don't have an | 131 | // If we're an NPC then skip all the item checks and manipulations since we don't have an |
132 | // inventory right now. | 132 | // inventory right now. |
133 | if (sp.PresenceType == PresenceType.Npc) | 133 | if (sp.PresenceType == PresenceType.Npc) |
134 | RezSingleAttachmentFromInventoryInternal(sp, UUID.Zero, attach.AssetID, p); | 134 | RezSingleAttachmentFromInventoryInternal(sp, UUID.Zero, attach.AssetID, p, null); |
135 | else | 135 | else |
136 | RezSingleAttachmentFromInventory(sp.ControllingClient, attach.ItemID, p); | 136 | RezSingleAttachmentFromInventory(sp.ControllingClient, attach.ItemID, p); |
137 | } | 137 | } |
@@ -343,17 +343,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
343 | return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true, null); | 343 | return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true, null); |
344 | } | 344 | } |
345 | 345 | ||
346 | public UUID RezSingleAttachmentFromInventory( | 346 | public ISceneEntity RezSingleAttachmentFromInventory( |
347 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc) | 347 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc) |
348 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | ||
349 | |||
350 | { | 348 | { |
349 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | ||
351 | if (sp == null) { m_log.ErrorFormat( "[ATTACHMENTS MODULE]: Could not find presence for client {0} {1} in RezSingleAttachmentFromInventory()", remoteClient.Name, remoteClient.AgentId); return null; } | 350 | if (sp == null) { m_log.ErrorFormat( "[ATTACHMENTS MODULE]: Could not find presence for client {0} {1} in RezSingleAttachmentFromInventory()", remoteClient.Name, remoteClient.AgentId); return null; } |
352 | // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should | 351 | // TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should |
353 | // be removed when that functionality is implemented in opensim | 352 | // be removed when that functionality is implemented in opensim |
354 | AttachmentPt &= 0x7f; | 353 | AttachmentPt &= 0x7f; |
355 | 354 | ||
356 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt, doc); | 355 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(sp, itemID, UUID.Zero, AttachmentPt, doc); |
357 | 356 | ||
358 | if (updateInventoryStatus) | 357 | if (updateInventoryStatus) |
359 | { | 358 | { |
@@ -367,7 +366,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
367 | } | 366 | } |
368 | 367 | ||
369 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( | 368 | protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( |
370 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, XmlDocument doc) | 369 | IScenePresence sp, UUID itemID, UUID assetID, uint attachmentPt, XmlDocument doc) |
371 | { | 370 | { |
372 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); | 371 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); |
373 | if (invAccess != null) | 372 | if (invAccess != null) |
@@ -462,9 +461,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
462 | if (!att.IsDeleted) | 461 | if (!att.IsDeleted) |
463 | attachmentPoint = att.AttachmentPoint; | 462 | attachmentPoint = att.AttachmentPoint; |
464 | 463 | ||
465 | ScenePresence presence; | ||
466 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) | ||
467 | { | ||
468 | InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); | 464 | InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); |
469 | if (m_scene.InventoryService != null) | 465 | if (m_scene.InventoryService != null) |
470 | item = m_scene.InventoryService.GetItem(item); | 466 | item = m_scene.InventoryService.GetItem(item); |