do consider skirt baked texture on validation

avinationmerge
UbitUmarov 2014-10-26 18:53:11 +00:00
parent 932b52f1bf
commit c46c3a27ae
1 changed files with 9 additions and 3 deletions

View File

@ -543,6 +543,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{
// we may have received a full cache
// check same coerence and store
wearableCacheValid = true;
for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++)
{
int idx = AvatarAppearance.BAKE_INDICES[i];
@ -555,16 +556,21 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
wearableCache[idx].TextureAsset.Temporary = true;
wearableCache[idx].TextureAsset.Local = true;
cache.Store(wearableCache[idx].TextureAsset);
}
else if (cache.GetCached((wearableCache[idx].TextureID).ToString()) != null)
{
hits++;
}
else
{
wearableCacheValid = false;
break;
}
}
}
wearableCacheValid = (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional
wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1));
if (wearableCacheValid)
m_log.Debug("[ValidateBakedCache] have valid local cache");
}