diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index e92f072..1955e5b 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -116,16 +116,20 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
116 | #endregion | 116 | #endregion |
117 | 117 | ||
118 | /// <summary> | 118 | /// <summary> |
119 | /// Check for the existence of the baked texture assets. Request a rebake | 119 | /// Check for the existence of the baked texture assets. |
120 | /// unless checkonly is true. | ||
121 | /// </summary> | 120 | /// </summary> |
122 | /// <param name="client"></param> | 121 | /// <param name="client"></param> |
123 | /// <param name="checkonly"></param> | ||
124 | public bool ValidateBakedTextureCache(IClientAPI client) | 122 | public bool ValidateBakedTextureCache(IClientAPI client) |
125 | { | 123 | { |
126 | return ValidateBakedTextureCache(client, true); | 124 | return ValidateBakedTextureCache(client, true); |
127 | } | 125 | } |
128 | 126 | ||
127 | /// <summary> | ||
128 | /// Check for the existence of the baked texture assets. Request a rebake | ||
129 | /// unless checkonly is true. | ||
130 | /// </summary> | ||
131 | /// <param name="client"></param> | ||
132 | /// <param name="checkonly"></param> | ||
129 | private bool ValidateBakedTextureCache(IClientAPI client, bool checkonly) | 133 | private bool ValidateBakedTextureCache(IClientAPI client, bool checkonly) |
130 | { | 134 | { |
131 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); | 135 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); |
@@ -156,18 +160,20 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
156 | 160 | ||
157 | defonly = false; // found a non-default texture reference | 161 | defonly = false; // found a non-default texture reference |
158 | 162 | ||
159 | if (! CheckBakedTextureAsset(client,face.TextureID,idx)) | 163 | if (!CheckBakedTextureAsset(client, face.TextureID, idx)) |
160 | { | 164 | { |
161 | // the asset didn't exist if we are only checking, then we found a bad | 165 | // the asset didn't exist if we are only checking, then we found a bad |
162 | // one and we're done otherwise, ask for a rebake | 166 | // one and we're done otherwise, ask for a rebake |
163 | if (checkonly) return false; | 167 | if (checkonly) |
168 | return false; | ||
164 | 169 | ||
165 | m_log.InfoFormat("[AVFACTORY]: missing baked texture {0}, requesting rebake",face.TextureID); | 170 | m_log.InfoFormat("[AVFACTORY]: missing baked texture {0}, requesting rebake", face.TextureID); |
171 | |||
166 | client.SendRebakeAvatarTextures(face.TextureID); | 172 | client.SendRebakeAvatarTextures(face.TextureID); |
167 | } | 173 | } |
168 | } | 174 | } |
169 | 175 | ||
170 | m_log.DebugFormat("[AVFACTORY]: completed texture check for {0}", client.AgentId); | 176 | m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0}", client.AgentId); |
171 | 177 | ||
172 | // If we only found default textures, then the appearance is not cached | 178 | // If we only found default textures, then the appearance is not cached |
173 | return (defonly ? false : true); | 179 | return (defonly ? false : true); |
@@ -183,7 +189,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
183 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); | 189 | ScenePresence sp = m_scene.GetScenePresence(client.AgentId); |
184 | if (sp == null) | 190 | if (sp == null) |
185 | { | 191 | { |
186 | m_log.WarnFormat("[AVFACTORY]: SetAppearance unable to find presence for {0}",client.AgentId); | 192 | m_log.WarnFormat("[AVFACTORY]: SetAppearance unable to find presence for {0}", client.AgentId); |
187 | return; | 193 | return; |
188 | } | 194 | } |
189 | 195 | ||
@@ -211,7 +217,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
211 | changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; | 217 | changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; |
212 | 218 | ||
213 | m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", client.AgentId); | 219 | m_log.InfoFormat("[AVFACTORY]: received texture update for {0}", client.AgentId); |
214 | Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); }); | 220 | Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client, false); }); |
215 | 221 | ||
216 | // This appears to be set only in the final stage of the appearance | 222 | // This appears to be set only in the final stage of the appearance |
217 | // update transaction. In theory, we should be able to do an immediate | 223 | // update transaction. In theory, we should be able to do an immediate |
@@ -220,9 +226,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
220 | // save only if there were changes, send no matter what (doesn't hurt to send twice) | 226 | // save only if there were changes, send no matter what (doesn't hurt to send twice) |
221 | if (changed) | 227 | if (changed) |
222 | QueueAppearanceSave(client.AgentId); | 228 | QueueAppearanceSave(client.AgentId); |
229 | |||
223 | QueueAppearanceSend(client.AgentId); | 230 | QueueAppearanceSend(client.AgentId); |
224 | } | 231 | } |
225 | |||
226 | } | 232 | } |
227 | 233 | ||
228 | // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); | 234 | // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); |