From 0cb0140a1d652c3ba47f1c9000d1ba81c8e786f8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Sep 2011 00:29:37 +0100 Subject: Stop the pointless double setting of every attachment in AvatarAppearance. The second was already being filtered out so this has no user level effect --- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 ++------ .../Avatar/Attachments/Tests/AttachmentsModuleTests.cs | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 4881499..e2e697e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -242,7 +242,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments { // m_log.DebugFormat( // "[ATTACHMENTS MODULE]: Attaching object {0} {1} to {2} point {3} from ground (silent = {4})", -// group.Name, group.LocalId, sp.Name, AttachmentPt, silent); +// group.Name, group.LocalId, sp.Name, attachmentPt, silent); if (sp.GetAttachments(attachmentPt).Contains(group)) { @@ -356,8 +356,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments { if (att == null) DetachSingleAttachmentToInv(itemID, sp.ControllingClient); - else - ShowAttachInUserInventory(att, sp, itemID, AttachmentPt); } return att; @@ -386,9 +384,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (objatt != null) { - // Loading the inventory from XML will have set this, but - // there is no way the object could have changed yet, - // since scripts aren't running yet. So, clear it here. + // HasGroupChanged is being set from within RezObject. Ideally it would be set by the caller. objatt.HasGroupChanged = false; bool tainted = false; if (attachmentPt != 0 && attachmentPt != objatt.AttachmentPoint) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 363e258..3f8c01f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs @@ -150,6 +150,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests Assert.That(attSo.IsTemporary, Is.False); // Check appearance status + Assert.That(m_presence.Appearance.GetAttachments().Count, Is.EqualTo(1)); Assert.That(m_presence.Appearance.GetAttachpoint(attItemId), Is.EqualTo((int)AttachmentPoint.Chest)); } -- cgit v1.1