diff options
Diffstat (limited to 'OpenSim')
3 files changed, 19 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 6eeef45..2556845 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -153,10 +153,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | 155 | ||
156 | /// <summary> | ||
157 | /// RezAttachments. This should only be called upon login on the first region. | ||
158 | /// Attachment rezzings on crossings and TPs are done in a different way. | ||
159 | /// </summary> | ||
160 | public void RezAttachments(IScenePresence sp) | 156 | public void RezAttachments(IScenePresence sp) |
161 | { | 157 | { |
162 | if (!Enabled) | 158 | if (!Enabled) |
@@ -165,9 +161,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
165 | if (null == sp.Appearance) | 161 | if (null == sp.Appearance) |
166 | { | 162 | { |
167 | m_log.WarnFormat("[ATTACHMENTS MODULE]: Appearance has not been initialized for agent {0}", sp.UUID); | 163 | m_log.WarnFormat("[ATTACHMENTS MODULE]: Appearance has not been initialized for agent {0}", sp.UUID); |
164 | |||
168 | return; | 165 | return; |
169 | } | 166 | } |
170 | 167 | ||
168 | if (sp.GetAttachments().Count > 0) | ||
169 | { | ||
170 | // m_log.DebugFormat( | ||
171 | // "[ATTACHMENTS MODULE]: Not doing simulator-side attachment rez for {0} in {1} as their viewer has already rezzed attachments", | ||
172 | // m_scene.Name, sp.Name); | ||
173 | |||
174 | return; | ||
175 | } | ||
176 | |||
171 | // m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); | 177 | // m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); |
172 | 178 | ||
173 | XmlDocument doc = new XmlDocument(); | 179 | XmlDocument doc = new XmlDocument(); |
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index eaaf7a3..a6cbf8d 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -54,6 +54,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
54 | /// RezAttachments. This should only be called upon login on the first region. | 54 | /// RezAttachments. This should only be called upon login on the first region. |
55 | /// Attachment rezzings on crossings and TPs are done in a different way. | 55 | /// Attachment rezzings on crossings and TPs are done in a different way. |
56 | /// </summary> | 56 | /// </summary> |
57 | /// <remarks> | ||
58 | /// This is only actually necessary for viewers which do not have a current outfit folder (these viewers make | ||
59 | /// their own attachment calls on login) and agents which have attachments but no viewer (e.g. NPCs). | ||
60 | /// </remarks> | ||
57 | /// <param name="sp"></param> | 61 | /// <param name="sp"></param> |
58 | void RezAttachments(IScenePresence sp); | 62 | void RezAttachments(IScenePresence sp); |
59 | 63 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 27a9dc3..486a075 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1098,13 +1098,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1098 | // haven't started yet. | 1098 | // haven't started yet. |
1099 | if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0) | 1099 | if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0) |
1100 | { | 1100 | { |
1101 | // We leave a 5 second pause before attempting to rez attachments to avoid a clash with | 1101 | // Viewers which have a current outfit folder will actually rez their own attachments. However, |
1102 | // version 3 viewers that maybe doing their own attachment rezzing related to their current | 1102 | // viewers without (e.g. v1 viewers) will not, so we still need to make this call. |
1103 | // outfit folder on startup. If these operations do clash, then the symptoms are invisible | 1103 | // |
1104 | // attachments until one zooms in on the avatar. | 1104 | // However, we leave a 5 second pause to try and avoid a clash with viewers that are rezzing |
1105 | // | 1105 | // attachments themselves. This should then mean that this call ends up doing nothing. |
1106 | // We do not pause if we are launching on the same thread anyway in order to avoid pointlessly | ||
1107 | // delaying any attachment related regression tests. | ||
1108 | if (Scene.AttachmentsModule != null) | 1106 | if (Scene.AttachmentsModule != null) |
1109 | Util.FireAndForget( | 1107 | Util.FireAndForget( |
1110 | o => | 1108 | o => |