aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-12-04 00:09:32 +0000
committerMelanie2010-12-04 00:09:32 +0000
commit24af7b8384d8236ad049c5432dfb574cb3b59dfe (patch)
tree2b9949652e0f4a9f4cf62e1b8a080a9aa37cfb71 /OpenSim/Region
parentWhen linking something, immediately persist the linked set. (diff)
parentVarious bug fixes for appearance handling: more aggressive reset of textures ... (diff)
downloadopensim-SC_OLD-24af7b8384d8236ad049c5432dfb574cb3b59dfe.zip
opensim-SC_OLD-24af7b8384d8236ad049c5432dfb574cb3b59dfe.tar.gz
opensim-SC_OLD-24af7b8384d8236ad049c5432dfb574cb3b59dfe.tar.bz2
opensim-SC_OLD-24af7b8384d8236ad049c5432dfb574cb3b59dfe.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs28
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
3 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c5ee385..06b4aea 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -361,13 +361,13 @@ namespace OpenSim
361 m_moduleLoader.InitialiseSharedModules(scene); 361 m_moduleLoader.InitialiseSharedModules(scene);
362 362
363 // Use this in the future, the line above will be deprecated soon 363 // Use this in the future, the line above will be deprecated soon
364 m_log.Info("[MODULES]: Loading Region's modules (new style)"); 364 m_log.Info("[REGIONMODULE]: Loading Region's modules (new style)");
365 IRegionModulesController controller; 365 IRegionModulesController controller;
366 if (ApplicationRegistry.TryGet(out controller)) 366 if (ApplicationRegistry.TryGet(out controller))
367 { 367 {
368 controller.AddRegionToModules(scene); 368 controller.AddRegionToModules(scene);
369 } 369 }
370 else m_log.Error("[MODULES]: The new RegionModulesController is missing..."); 370 else m_log.Error("[REGIONMODULE]: The new RegionModulesController is missing...");
371 371
372 if (m_securePermissionsLoading) 372 if (m_securePermissionsLoading)
373 { 373 {
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 63e7ddc..7d6d191 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -115,7 +115,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
115 115
116 #endregion 116 #endregion
117 117
118 118 /// <summary>
119 /// Check for the existence of the baked texture assets. Request a rebake
120 /// unless checkonly is true.
121 /// </summary>
122 /// <param name="client"></param>
123 /// <param name="checkonly"></param>
119 public bool ValidateBakedTextureCache(IClientAPI client) 124 public bool ValidateBakedTextureCache(IClientAPI client)
120 { 125 {
121 return ValidateBakedTextureCache(client, true); 126 return ValidateBakedTextureCache(client, true);
@@ -157,12 +162,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
157 // one and we're done otherwise, ask for a rebake 162 // one and we're done otherwise, ask for a rebake
158 if (checkonly) return false; 163 if (checkonly) return false;
159 164
160 m_log.WarnFormat("[AVFACTORY] missing baked texture {0}, request rebake",face.TextureID); 165 m_log.InfoFormat("[AVFACTORY] missing baked texture {0}, request rebake",face.TextureID);
161 client.SendRebakeAvatarTextures(face.TextureID); 166 client.SendRebakeAvatarTextures(face.TextureID);
162 } 167 }
163 } 168 }
164 169
165 m_log.WarnFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId); 170 m_log.InfoFormat("[AVFACTORY]: complete texture check for {0}",client.AgentId);
166 171
167 // If we only found default textures, then the appearance is not cached 172 // If we only found default textures, then the appearance is not cached
168 return (defonly ? false : true); 173 return (defonly ? false : true);
@@ -182,8 +187,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
182 return; 187 return;
183 } 188 }
184 189
185 m_log.WarnFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId); 190 m_log.InfoFormat("[AVFACTORY]: start SetAppearance for {0}",client.AgentId);
186 191
192 // TODO: This is probably not necessary any longer, just assume the
193 // textureEntry set implies that the appearance transaction is complete
187 bool changed = false; 194 bool changed = false;
188 195
189 // Process the texture entry transactionally, this doesn't guarantee that Appearance is 196 // Process the texture entry transactionally, this doesn't guarantee that Appearance is
@@ -203,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
203 { 210 {
204 changed = sp.Appearance.SetTextureEntries(textureEntry) || changed; 211 changed = sp.Appearance.SetTextureEntries(textureEntry) || changed;
205 212
206 m_log.WarnFormat("[AVFACTORY]: received texture update for {0}",client.AgentId); 213 m_log.InfoFormat("[AVFACTORY]: received texture update for {0}",client.AgentId);
207 Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); }); 214 Util.FireAndForget(delegate(object o) { ValidateBakedTextureCache(client,false); });
208 215
209 // This appears to be set only in the final stage of the appearance 216 // This appears to be set only in the final stage of the appearance
@@ -216,13 +223,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
216 223
217 } 224 }
218 225
219// // If something changed in the appearance then queue an appearance save
220// if (changed)
221// QueueAppearanceSave(client.AgentId);
222
223// // And always queue up an appearance update to send out
224// QueueAppearanceSend(client.AgentId);
225
226 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString()); 226 // m_log.WarnFormat("[AVFACTORY]: complete SetAppearance for {0}:\n{1}",client.AgentId,sp.Appearance.ToString());
227 } 227 }
228 228
@@ -377,9 +377,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
377 377
378 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId); 378 // m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}", client.AgentId);
379 379
380 // we need to clean out the existing textures
381 sp.Appearance.ResetAppearance();
382
380 // operate on a copy of the appearance so we don't have to lock anything 383 // operate on a copy of the appearance so we don't have to lock anything
381 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false); 384 AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
382 sp.Appearance.ResetBakedTextures(); // this makes sure we don't reuse old textures if the baking takes time
383 385
384 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) 386 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
385 { 387 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 5a842d8..7ce94d4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2789,7 +2789,7 @@ namespace OpenSim.Region.Framework.Scenes
2789 // If we aren't using a cached appearance, then clear out the baked textures 2789 // If we aren't using a cached appearance, then clear out the baked textures
2790 if (! cachedappearance) 2790 if (! cachedappearance)
2791 { 2791 {
2792 m_appearance.ResetBakedTextures(); 2792 m_appearance.ResetAppearance();
2793 if (m_scene.AvatarFactory != null) 2793 if (m_scene.AvatarFactory != null)
2794 m_scene.AvatarFactory.QueueAppearanceSave(UUID); 2794 m_scene.AvatarFactory.QueueAppearanceSave(UUID);
2795 } 2795 }
@@ -2799,12 +2799,12 @@ namespace OpenSim.Region.Framework.Scenes
2799 // again here... this comes after the cached appearance check because the avatars 2799 // again here... this comes after the cached appearance check because the avatars
2800 // appearance goes into the avatar update packet 2800 // appearance goes into the avatar update packet
2801 SendAvatarDataToAllAgents(); 2801 SendAvatarDataToAllAgents();
2802 SendAppearanceToAgent(this);
2802 2803
2803 // If we are using the the cached appearance then send it out to everyone 2804 // If we are using the the cached appearance then send it out to everyone
2804 if (cachedappearance) 2805 if (cachedappearance)
2805 { 2806 {
2806 m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); 2807 m_log.InfoFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name);
2807 SendAppearanceToAgent(this);
2808 2808
2809 // If the avatars baked textures are all in the cache, then we have a 2809 // If the avatars baked textures are all in the cache, then we have a
2810 // complete appearance... send it out, if not, then we'll send it when 2810 // complete appearance... send it out, if not, then we'll send it when