diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 2bb60d5..394b90a 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
237 | if (sp.PresenceType == PresenceType.Npc) | 237 | if (sp.PresenceType == PresenceType.Npc) |
238 | RezSingleAttachmentFromInventoryInternal(sp, UUID.Zero, attach.AssetID, p, null); | 238 | RezSingleAttachmentFromInventoryInternal(sp, UUID.Zero, attach.AssetID, p, null); |
239 | else | 239 | else |
240 | RezSingleAttachmentFromInventory(sp, attach.ItemID, p, true, d); | 240 | RezSingleAttachmentFromInventory(sp, attach.ItemID, p, d); |
241 | } | 241 | } |
242 | catch (Exception e) | 242 | catch (Exception e) |
243 | { | 243 | { |
@@ -405,10 +405,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
405 | 405 | ||
406 | public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) | 406 | public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt) |
407 | { | 407 | { |
408 | return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, true, null); | 408 | return RezSingleAttachmentFromInventory(sp, itemID, AttachmentPt, null); |
409 | } | 409 | } |
410 | 410 | ||
411 | public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, bool updateInventoryStatus, XmlDocument doc) | 411 | public ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt, XmlDocument doc) |
412 | { | 412 | { |
413 | if (!Enabled) | 413 | if (!Enabled) |
414 | return null; | 414 | return null; |
@@ -596,6 +596,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
596 | /// </remarks> | 596 | /// </remarks> |
597 | /// <param name="sp"></param> | 597 | /// <param name="sp"></param> |
598 | /// <param name="grp"></param> | 598 | /// <param name="grp"></param> |
599 | /// <param name="saveAllScripted"></param> | ||
599 | private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, bool saveAllScripted) | 600 | private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, bool saveAllScripted) |
600 | { | 601 | { |
601 | // Saving attachments for NPCs messes them up for the real owner! | 602 | // Saving attachments for NPCs messes them up for the real owner! |
@@ -789,18 +790,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
789 | null, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, | 790 | null, assetID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, |
790 | false, false, sp.UUID, true); | 791 | false, false, sp.UUID, true); |
791 | 792 | ||
792 | // m_log.DebugFormat( | ||
793 | // "[ATTACHMENTS MODULE]: Retrieved single object {0} for attachment to {1} on point {2}", | ||
794 | // objatt.Name, remoteClient.Name, AttachmentPt); | ||
795 | |||
796 | if (objatt != null) | 793 | if (objatt != null) |
797 | { | 794 | { |
795 | // m_log.DebugFormat( | ||
796 | // "[ATTACHMENTS MODULE]: Rezzed single object {0} for attachment to {1} on point {2} in {3}", | ||
797 | // objatt.Name, sp.Name, attachmentPt, m_scene.Name); | ||
798 | |||
798 | // HasGroupChanged is being set from within RezObject. Ideally it would be set by the caller. | 799 | // HasGroupChanged is being set from within RezObject. Ideally it would be set by the caller. |
799 | objatt.HasGroupChanged = false; | 800 | objatt.HasGroupChanged = false; |
800 | bool tainted = false; | 801 | bool tainted = false; |
801 | if (attachmentPt != 0 && attachmentPt != objatt.AttachmentPoint) | 802 | if (attachmentPt != 0 && attachmentPt != objatt.AttachmentPoint) |
802 | tainted = true; | 803 | tainted = true; |
803 | 804 | ||
805 | // FIXME: Detect whether it's really likely for AttachObject to throw an exception in the normal | ||
806 | // course of events. If not, then it's probably not worth trying to recover the situation | ||
807 | // since this is more likely to trigger further exceptions and confuse later debugging. If | ||
808 | // exceptions can be thrown in expected error conditions (not NREs) then make this consistent | ||
809 | // since other normal error conditions will simply return false instead. | ||
804 | // This will throw if the attachment fails | 810 | // This will throw if the attachment fails |
805 | try | 811 | try |
806 | { | 812 | { |