only send to bakedmodule the baked textures :)
parent
b7f24bacce
commit
12d8ed2dcd
|
@ -423,7 +423,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wearableCache[idx].TextureAsset = null;
|
wearableCache[idx].TextureAsset = null;
|
||||||
if (cache != null)
|
if (cache != null)
|
||||||
wearableCache[idx].TextureAsset = cache.GetCached(face.TextureID.ToString());
|
wearableCache[idx].TextureAsset = cache.GetCached(face.TextureID.ToString());
|
||||||
|
@ -456,7 +455,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache");
|
m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache");
|
||||||
|
|
||||||
m_BakedTextureModule.Store(sp.UUID, wearableCache);
|
WearableCacheItem[] toBakedModule = new WearableCacheItem[AvatarAppearance.BAKE_INDICES.Length];
|
||||||
|
|
||||||
|
for (int i = 0; i < cacheItems.Length; i++)
|
||||||
|
{
|
||||||
|
int idx = (int)cacheItems[i].TextureIndex;
|
||||||
|
cacheItems[i].CacheId = wearableCache[idx].CacheId;
|
||||||
|
cacheItems[i].TextureID = wearableCache[idx].TextureID;
|
||||||
|
cacheItems[i].TextureAsset = wearableCache[idx].TextureAsset;
|
||||||
|
}
|
||||||
|
m_BakedTextureModule.Store(sp.UUID, cacheItems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,22 +521,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
|
|
||||||
if (bakedModuleCache != null)
|
if (bakedModuleCache != null)
|
||||||
{
|
{
|
||||||
m_log.Debug("[ValidateBakedCache] got bakedModule cache " + wearableCache.Length);
|
m_log.Debug("[ValidateBakedCache] got bakedModule cache " + bakedModuleCache.Length);
|
||||||
|
|
||||||
// old store have diferent sizes and index starts at 1
|
|
||||||
int offset = 0;
|
|
||||||
if (bakedModuleCache[0].TextureIndex == 1)
|
|
||||||
offset = -1;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
for (int i = 0; i < bakedModuleCache.Length; i++)
|
for (int i = 0; i < bakedModuleCache.Length; i++)
|
||||||
{
|
{
|
||||||
j = (int)bakedModuleCache[i].TextureIndex + offset;
|
int j = (int)bakedModuleCache[i].TextureIndex;
|
||||||
|
|
||||||
if (bakedModuleCache[i].TextureAsset != null)
|
if (bakedModuleCache[i].TextureAsset != null)
|
||||||
{
|
{
|
||||||
wearableCache[j].TextureID = bakedModuleCache[i].TextureID;
|
wearableCache[j].TextureID = bakedModuleCache[i].TextureID;
|
||||||
wearableCache[j].CacheId = bakedModuleCache[i].TextureID;
|
wearableCache[j].CacheId = bakedModuleCache[i].TextureID;
|
||||||
|
wearableCache[j].TextureAsset = bakedModuleCache[i].TextureAsset;
|
||||||
bakedModuleCache[i].TextureAsset.Temporary = true;
|
bakedModuleCache[i].TextureAsset.Temporary = true;
|
||||||
bakedModuleCache[i].TextureAsset.Local = true;
|
bakedModuleCache[i].TextureAsset.Local = true;
|
||||||
cache.Store(bakedModuleCache[i].TextureAsset);
|
cache.Store(bakedModuleCache[i].TextureAsset);
|
||||||
|
|
Loading…
Reference in New Issue