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.
---
OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 4 ++++
OpenSim/Region/Framework/Scenes/ScenePresence.cs | 12 +++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index 46daab3..156a09d 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -53,6 +53,10 @@ namespace OpenSim.Region.Framework.Interfaces
/// RezAttachments. This should only be called upon login on the first region.
/// Attachment rezzings on crossings and TPs are done in a different way.
///
+ ///
+ /// This is only actually necessary for viewers which do not have a current outfit folder (these viewers make
+ /// their own attachment calls on login) and agents which have attachments but no viewer (e.g. NPCs).
+ ///
///
void RezAttachments(IScenePresence sp);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3a1e758..fcb2f6d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -953,13 +953,11 @@ namespace OpenSim.Region.Framework.Scenes
// haven't started yet.
if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0)
{
- // We leave a 5 second pause before attempting to rez attachments to avoid a clash with
- // version 3 viewers that maybe doing their own attachment rezzing related to their current
- // outfit folder on startup. If these operations do clash, then the symptoms are invisible
- // attachments until one zooms in on the avatar.
- //
- // We do not pause if we are launching on the same thread anyway in order to avoid pointlessly
- // delaying any attachment related regression tests.
+ // Viewers which have a current outfit folder will actually rez their own attachments. However,
+ // viewers without (e.g. v1 viewers) will not, so we still need to make this call.
+ //
+ // However, we leave a 5 second pause to try and avoid a clash with viewers that are rezzing
+ // attachments themselves. This should then mean that this call ends up doing nothing.
if (Scene.AttachmentsModule != null)
Util.FireAndForget(
o =>
--
cgit v1.1