diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs index f49697dc0a..af28abc74c 100644 --- a/OpenSim/Framework/WearableCacheItem.cs +++ b/OpenSim/Framework/WearableCacheItem.cs @@ -144,12 +144,14 @@ namespace OpenSim.Framework itemmap.Add("textureindex", OSD.FromUInteger(item.TextureIndex)); itemmap.Add("cacheid", OSD.FromUUID(item.CacheId)); itemmap.Add("textureid", OSD.FromUUID(item.TextureID)); +/* if (item.TextureAsset != null) { itemmap.Add("assetdata", OSD.FromBinary(item.TextureAsset.Data)); itemmap.Add("assetcreator", OSD.FromString(item.TextureAsset.CreatorID)); itemmap.Add("assetname", OSD.FromString(item.TextureAsset.Name)); } + */ arr.Add(itemmap); } return arr; @@ -169,6 +171,7 @@ namespace OpenSim.Framework continue; pcache[idx].CacheId = item["cacheid"].AsUUID(); pcache[idx].TextureID = item["textureid"].AsUUID(); +/* if (item.ContainsKey("assetdata")) { AssetBase asset = new AssetBase(item["textureid"].AsUUID(), "BakedTexture", (sbyte)AssetType.Texture, UUID.Zero.ToString()); @@ -178,6 +181,7 @@ namespace OpenSim.Framework pcache[idx].TextureAsset = asset; } else + */ pcache[idx].TextureAsset = null; } } diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bd243ad619..297044f8a8 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -547,12 +547,20 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory { int idx = AvatarAppearance.BAKE_INDICES[i]; Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx]; - if (face != null && face.TextureID == wearableCache[idx].TextureID && wearableCache[idx].TextureAsset != null) + if (face != null && face.TextureID == wearableCache[idx].TextureID) { - hits++; - wearableCache[idx].TextureAsset.Temporary = true; - wearableCache[idx].TextureAsset.Local = true; - cache.Store(wearableCache[idx].TextureAsset); + if (wearableCache[idx].TextureAsset != null) + { + hits++; + 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++; + } } }