make grid baked textures override the ones on appearance. Due to bug
somewhere they are always bad at ValidateBakedTextures entry. ( even if they where good and on assets cache we whould need to generate the cacheID hash )avinationmerge
parent
38e2e5942c
commit
f788947594
|
@ -495,6 +495,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
wearableCache = WearableCacheItem.GetDefaultCacheItem();
|
||||
|
||||
int hits = 0;
|
||||
bool gotbacked = false;
|
||||
|
||||
// Cache wearable data for teleport.
|
||||
// Only makes sense if there's a bake module and a cache module
|
||||
if (bakedModule != null && cache != null)
|
||||
|
@ -525,8 +527,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
bakedModuleCache[i].TextureAsset.Temporary = true;
|
||||
bakedModuleCache[i].TextureAsset.Local = true;
|
||||
cache.Store(bakedModuleCache[i].TextureAsset);
|
||||
|
||||
}
|
||||
}
|
||||
gotbacked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -536,6 +540,26 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
int idx = AvatarAppearance.BAKE_INDICES[i];
|
||||
Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx];
|
||||
|
||||
// on tp viewer assumes servers did the cache work
|
||||
// and tp propagation of baked textures is broken somewhere
|
||||
// so make grid cache be mandatory
|
||||
if (gotbacked)
|
||||
{
|
||||
m_log.Debug("[ValidateBakedCache] bakedModule cache override");
|
||||
|
||||
sp.Appearance.Texture.FaceTextures[idx].TextureID = wearableCache[idx].TextureID;
|
||||
face = sp.Appearance.Texture.FaceTextures[idx];
|
||||
|
||||
// this should be removed
|
||||
if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE)
|
||||
{
|
||||
defonly = false; // found a non-default texture reference
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No face, so lets check our cache
|
||||
if (face == null || face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE)
|
||||
{
|
||||
|
@ -550,9 +574,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
{
|
||||
sp.Appearance.Texture.FaceTextures[idx].TextureID = AppearanceManager.DEFAULT_AVATAR_TEXTURE;
|
||||
face = sp.Appearance.Texture.FaceTextures[idx];
|
||||
// lets try not invalidating the cache entry
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
@ -563,7 +587,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
continue;
|
||||
}
|
||||
|
||||
if(wearableCache[idx].TextureID != face.TextureID)
|
||||
if (wearableCache[idx].TextureID != face.TextureID)
|
||||
{
|
||||
wearableCache[idx].CacheId = UUID.Zero;
|
||||
wearableCache[idx].TextureID = UUID.Zero;
|
||||
|
@ -584,6 +608,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
|||
hits++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sp.Appearance.WearableCacheItems = wearableCache;
|
||||
|
||||
|
|
Loading…
Reference in New Issue