diff options
-rw-r--r-- | OpenSim/Framework/WearableCacheItem.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs index f49697d..af28abc 100644 --- a/OpenSim/Framework/WearableCacheItem.cs +++ b/OpenSim/Framework/WearableCacheItem.cs | |||
@@ -144,12 +144,14 @@ namespace OpenSim.Framework | |||
144 | itemmap.Add("textureindex", OSD.FromUInteger(item.TextureIndex)); | 144 | itemmap.Add("textureindex", OSD.FromUInteger(item.TextureIndex)); |
145 | itemmap.Add("cacheid", OSD.FromUUID(item.CacheId)); | 145 | itemmap.Add("cacheid", OSD.FromUUID(item.CacheId)); |
146 | itemmap.Add("textureid", OSD.FromUUID(item.TextureID)); | 146 | itemmap.Add("textureid", OSD.FromUUID(item.TextureID)); |
147 | /* | ||
147 | if (item.TextureAsset != null) | 148 | if (item.TextureAsset != null) |
148 | { | 149 | { |
149 | itemmap.Add("assetdata", OSD.FromBinary(item.TextureAsset.Data)); | 150 | itemmap.Add("assetdata", OSD.FromBinary(item.TextureAsset.Data)); |
150 | itemmap.Add("assetcreator", OSD.FromString(item.TextureAsset.CreatorID)); | 151 | itemmap.Add("assetcreator", OSD.FromString(item.TextureAsset.CreatorID)); |
151 | itemmap.Add("assetname", OSD.FromString(item.TextureAsset.Name)); | 152 | itemmap.Add("assetname", OSD.FromString(item.TextureAsset.Name)); |
152 | } | 153 | } |
154 | */ | ||
153 | arr.Add(itemmap); | 155 | arr.Add(itemmap); |
154 | } | 156 | } |
155 | return arr; | 157 | return arr; |
@@ -169,6 +171,7 @@ namespace OpenSim.Framework | |||
169 | continue; | 171 | continue; |
170 | pcache[idx].CacheId = item["cacheid"].AsUUID(); | 172 | pcache[idx].CacheId = item["cacheid"].AsUUID(); |
171 | pcache[idx].TextureID = item["textureid"].AsUUID(); | 173 | pcache[idx].TextureID = item["textureid"].AsUUID(); |
174 | /* | ||
172 | if (item.ContainsKey("assetdata")) | 175 | if (item.ContainsKey("assetdata")) |
173 | { | 176 | { |
174 | AssetBase asset = new AssetBase(item["textureid"].AsUUID(), "BakedTexture", (sbyte)AssetType.Texture, UUID.Zero.ToString()); | 177 | AssetBase asset = new AssetBase(item["textureid"].AsUUID(), "BakedTexture", (sbyte)AssetType.Texture, UUID.Zero.ToString()); |
@@ -178,6 +181,7 @@ namespace OpenSim.Framework | |||
178 | pcache[idx].TextureAsset = asset; | 181 | pcache[idx].TextureAsset = asset; |
179 | } | 182 | } |
180 | else | 183 | else |
184 | */ | ||
181 | pcache[idx].TextureAsset = null; | 185 | pcache[idx].TextureAsset = null; |
182 | } | 186 | } |
183 | } | 187 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bd243ad..297044f 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 | |||
547 | { | 547 | { |
548 | int idx = AvatarAppearance.BAKE_INDICES[i]; | 548 | int idx = AvatarAppearance.BAKE_INDICES[i]; |
549 | Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx]; | 549 | Primitive.TextureEntryFace face = sp.Appearance.Texture.FaceTextures[idx]; |
550 | if (face != null && face.TextureID == wearableCache[idx].TextureID && wearableCache[idx].TextureAsset != null) | 550 | if (face != null && face.TextureID == wearableCache[idx].TextureID) |
551 | { | 551 | { |
552 | hits++; | 552 | if (wearableCache[idx].TextureAsset != null) |
553 | wearableCache[idx].TextureAsset.Temporary = true; | 553 | { |
554 | wearableCache[idx].TextureAsset.Local = true; | 554 | hits++; |
555 | cache.Store(wearableCache[idx].TextureAsset); | 555 | wearableCache[idx].TextureAsset.Temporary = true; |
556 | wearableCache[idx].TextureAsset.Local = true; | ||
557 | cache.Store(wearableCache[idx].TextureAsset); | ||
558 | |||
559 | } | ||
560 | else if (cache.GetCached((wearableCache[idx].TextureID).ToString()) != null) | ||
561 | { | ||
562 | hits++; | ||
563 | } | ||
556 | } | 564 | } |
557 | } | 565 | } |
558 | 566 | ||