lock set appearence during ValidateBakedTextureCache there seems to be a

overlap in same cases
avinationmerge
UbitUmarov 2014-08-08 02:22:18 +01:00
parent 998e3d435a
commit 9aa6389b8b
1 changed files with 106 additions and 102 deletions

View File

@ -487,6 +487,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public bool ValidateBakedTextureCache(IScenePresence sp)
{
bool defonly = true; // are we only using default textures
lock (m_setAppearanceLock)
{
IAssetService cache = m_scene.AssetService;
IBakedTextureModule bakedModule = m_scene.RequestModuleInterface<IBakedTextureModule>();
WearableCacheItem[] wearableCache = null;
@ -545,8 +548,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
// so make grid cache be mandatory
if (gotbacked)
{
// m_log.Debug("[ValidateBakedCache] bakedModule cache override");
if(sp.Appearance.Texture.FaceTextures[idx] == null)
// m_log.Debug("[ValidateBakedCache] bakedModule cache override");
if (sp.Appearance.Texture.FaceTextures[idx] == null)
sp.Appearance.Texture.FaceTextures[idx] = sp.Appearance.Texture.CreateFace((uint)idx);
sp.Appearance.Texture.FaceTextures[idx].TextureID = wearableCache[idx].TextureID;
face = sp.Appearance.Texture.FaceTextures[idx];
@ -612,6 +615,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
}
sp.Appearance.WearableCacheItems = wearableCache;
}
m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2} {3}", sp.Name, sp.UUID, hits, defonly.ToString());
// debug