From 4ad9b275302ee109937512963eab095ff542a0c7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Mar 2013 22:51:59 +0000 Subject: If the viewer has already rezzed any attachments itself, then ignore the simulator-side rez attachments call. This is a further effort to reduce v3 viewer race conditions where this call may clash with the viewer signalling attachment wearing from its current outfit folder. --- .../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index a46834c..55c5422 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -182,10 +182,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments } } - /// - /// RezAttachments. This should only be called upon login on the first region. - /// Attachment rezzings on crossings and TPs are done in a different way. - /// public void RezAttachments(IScenePresence sp) { if (!Enabled) @@ -194,9 +190,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (null == sp.Appearance) { m_log.WarnFormat("[ATTACHMENTS MODULE]: Appearance has not been initialized for agent {0}", sp.UUID); + return; } + if (sp.GetAttachments().Count > 0) + { +// m_log.DebugFormat( +// "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments", +// m_scene.Name, sp.Name); + + return; + } + // m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); List attachments = sp.Appearance.GetAttachments(); -- cgit v1.1