OpenSim.Region.CoreModules.Avatar.AvatarFactory.AvatarFactoryModule.ValidateBakedTextureCache C# (CSharp) Method

ValidateBakedTextureCache() public method

public ValidateBakedTextureCache ( IClientAPI client ) : bool
client IClientAPI
return bool
        public bool ValidateBakedTextureCache(IClientAPI client)
        {
            ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
            if (sp == null)
            {
                m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}", client.AgentId);
                return false;
            }

            bool cached = true;

            // Process the texture entry
            for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++)
            {
                int idx = AvatarAppearance.BAKE_INDICES[i];
                Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx];
                if (face != null && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE)
                    if (! CheckBakedTextureAsset(client,face.TextureID,idx))
                    {
                        sp.Appearance.Texture.FaceTextures[idx] = null;
                        cached = false;
                    }
            }

            return cached;
        }