diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index efab6ed..64ee7e4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -339,7 +339,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
339 | ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group); | 339 | ShowAttachInUserInventory(sp, attachmentPt, newAttachmentItemID, group); |
340 | } | 340 | } |
341 | 341 | ||
342 | public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) | 342 | public SceneObjectGroup RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) |
343 | { | 343 | { |
344 | if (!Enabled) | 344 | if (!Enabled) |
345 | return null; | 345 | return null; |
@@ -527,6 +527,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
527 | /// </remarks> | 527 | /// </remarks> |
528 | /// <param name="sp"></param> | 528 | /// <param name="sp"></param> |
529 | /// <param name="grp"></param> | 529 | /// <param name="grp"></param> |
530 | /// <param name="saveAllScripted"></param> | ||
530 | private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, bool saveAllScripted) | 531 | private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, bool saveAllScripted) |
531 | { | 532 | { |
532 | // Saving attachments for NPCs messes them up for the real owner! | 533 | // Saving attachments for NPCs messes them up for the real owner! |
@@ -720,18 +721,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
720 | null, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, | 721 | null, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, |
721 | false, false, sp.UUID, true); | 722 | false, false, sp.UUID, true); |
722 | 723 | ||
723 | // m_log.DebugFormat( | ||
724 | // "[ATTACHMENTS MODULE]: Retrieved single object {0} for attachment to {1} on point {2}", | ||
725 | // objatt.Name, remoteClient.Name, AttachmentPt); | ||
726 | |||
727 | if (objatt != null) | 724 | if (objatt != null) |
728 | { | 725 | { |
726 | // m_log.DebugFormat( | ||
727 | // "[ATTACHMENTS MODULE]: Rezzed single object {0} for attachment to {1} on point {2} in {3}", | ||
728 | // objatt.Name, sp.Name, attachmentPt, m_scene.Name); | ||
729 | |||
729 | // HasGroupChanged is being set from within RezObject. Ideally it would be set by the caller. | 730 | // HasGroupChanged is being set from within RezObject. Ideally it would be set by the caller. |
730 | objatt.HasGroupChanged = false; | 731 | objatt.HasGroupChanged = false; |
731 | bool tainted = false; | 732 | bool tainted = false; |
732 | if (attachmentPt != 0 && attachmentPt != objatt.AttachmentPoint) | 733 | if (attachmentPt != 0 && attachmentPt != objatt.AttachmentPoint) |
733 | tainted = true; | 734 | tainted = true; |
734 | 735 | ||
736 | // FIXME: Detect whether it's really likely for AttachObject to throw an exception in the normal | ||
737 | // course of events. If not, then it's probably not worth trying to recover the situation | ||
738 | // since this is more likely to trigger further exceptions and confuse later debugging. If | ||
739 | // exceptions can be thrown in expected error conditions (not NREs) then make this consistent | ||
740 | // since other normal error conditions will simply return false instead. | ||
735 | // This will throw if the attachment fails | 741 | // This will throw if the attachment fails |
736 | try | 742 | try |
737 | { | 743 | { |