From 36ecad98a1c04e09ceff17ce6850a45d38f9c95f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 10 Nov 2014 04:48:19 +0100 Subject: [PATCH] Only send the actual bakes to the bakes module --- .../Avatar/AvatarFactory/AvatarFactoryModule.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 1d2fd4e8bd..1eb7d2dc05 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -462,14 +462,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory WearableCacheItem[] toBakedModule = new WearableCacheItem[AvatarAppearance.BAKE_INDICES.Length]; - for (int i = 0; i < cacheItems.Length; i++) + for (int i = 0; i < AvatarAppearance.BAKE_INDICES.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; + int idx = (int)AvatarAppearance.BAKE_INDICES[i]; + toBakedModule[i] = new WearableCacheItem(); + toBakedModule[i].TextureIndex = (uint)idx; + toBakedModule[i].CacheId = wearableCache[idx].CacheId; + toBakedModule[i].TextureID = wearableCache[idx].TextureID; + toBakedModule[i].TextureAsset = wearableCache[idx].TextureAsset; } - m_BakedTextureModule.Store(sp.UUID, cacheItems); + m_BakedTextureModule.Store(sp.UUID, toBakedModule); } }