From dfa9ba0937f6e2d30e1d541d64533ede4ecb671e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 7 Aug 2014 08:47:03 +0100 Subject: minor clean, dont check for cache if we aren't using it.. --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 28 ++++------------------ 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/AvatarFactory') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index edf62db..2e5c58a 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -493,18 +493,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory wearableCache = WearableCacheItem.GetDefaultCacheItem(); - // debug - for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) - { - int j = AvatarAppearance.BAKE_INDICES[iter]; - Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[iter]; - if(face != null) - m_log.Debug("[ValidateBakedCache] {" + iter + "/" + j + " t - " + face.TextureID); - else - m_log.Debug("[ValidateBakedCache] {" + iter + "/" + j + " t - No texture"); - } - - int hits = 0; + int hits = 0; // Cache wearable data for teleport. // Only makes sense if there's a bake module and a cache module if (bakedModule != null && cache != null) @@ -546,7 +535,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory int idx = AvatarAppearance.BAKE_INDICES[i]; Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx]; - // No face, so lets check our baked service cache, teleport or login. + // No face, so lets check our cache if (face == null || face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) { sp.Appearance.Texture.FaceTextures[idx] = sp.Appearance.Texture.CreateFace((uint)idx); @@ -560,8 +549,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { sp.Appearance.Texture.FaceTextures[idx].TextureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE; face = sp.Appearance.Texture.FaceTextures[idx]; - wearableCache[idx].CacheId = UUID.Zero; - wearableCache[idx].TextureAsset = null; +// lets try not invalidating the cache entry +// wearableCache[idx].CacheId = UUID.Zero; +// wearableCache[idx].TextureAsset = null; continue; } } @@ -624,14 +614,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory if (face == null) continue; -// m_log.DebugFormat( -// "[AVFACTORY]: Looking for texture {0}, id {1} for {2} {3}", -// face.TextureID, idx, client.Name, client.AgentId); - - // if the texture is one of the "defaults" then skip it - // this should probably be more intelligent (skirt texture doesnt matter - // if the avatar isnt wearing a skirt) but if any of the main baked - // textures is default then the rest should be as well if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) continue; -- cgit v1.1