diff options
author | Melanie | 2013-01-27 01:09:07 +0000 |
---|---|---|
committer | Melanie | 2013-01-27 01:09:07 +0000 |
commit | e6e6e8ab1541044135d28514d402b64ed06825a0 (patch) | |
tree | a9051a927857f0ec15187d5faee6bfc222fb0461 /OpenSim/Region/ClientStack/Linden/Caps | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Prevent items being destroyed by rename operations. Renaming of a wearable also (diff) | |
download | opensim-SC-e6e6e8ab1541044135d28514d402b64ed06825a0.zip opensim-SC-e6e6e8ab1541044135d28514d402b64ed06825a0.tar.gz opensim-SC-e6e6e8ab1541044135d28514d402b64ed06825a0.tar.bz2 opensim-SC-e6e6e8ab1541044135d28514d402b64ed06825a0.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 6bed95f..eca576d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | |||
@@ -190,8 +190,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
190 | { | 190 | { |
191 | if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) | 191 | if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) |
192 | { | 192 | { |
193 | cacheItems[i].TextureID = | 193 | Primitive.TextureEntryFace face = textureEntry.FaceTextures[cacheItems[i].TextureIndex]; |
194 | textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID; | 194 | if (face == null) |
195 | { | ||
196 | textureEntry.CreateFace(cacheItems[i].TextureIndex); | ||
197 | textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID = | ||
198 | AppearanceManager.DEFAULT_AVATAR_TEXTURE; | ||
199 | continue; | ||
200 | } | ||
201 | cacheItems[i].TextureID =face.TextureID; | ||
195 | if (m_scene.AssetService != null) | 202 | if (m_scene.AssetService != null) |
196 | cacheItems[i].TextureAsset = | 203 | cacheItems[i].TextureAsset = |
197 | m_scene.AssetService.GetCached(cacheItems[i].TextureID.ToString()); | 204 | m_scene.AssetService.GetCached(cacheItems[i].TextureID.ToString()); |
@@ -213,8 +220,16 @@ namespace OpenSim.Region.ClientStack.Linden | |||
213 | { | 220 | { |
214 | if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) | 221 | if (textureEntry.FaceTextures.Length > cacheItems[i].TextureIndex) |
215 | { | 222 | { |
223 | Primitive.TextureEntryFace face = textureEntry.FaceTextures[cacheItems[i].TextureIndex]; | ||
224 | if (face == null) | ||
225 | { | ||
226 | textureEntry.CreateFace(cacheItems[i].TextureIndex); | ||
227 | textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID = | ||
228 | AppearanceManager.DEFAULT_AVATAR_TEXTURE; | ||
229 | continue; | ||
230 | } | ||
216 | cacheItems[i].TextureID = | 231 | cacheItems[i].TextureID = |
217 | textureEntry.FaceTextures[cacheItems[i].TextureIndex].TextureID; | 232 | face.TextureID; |
218 | } | 233 | } |
219 | else | 234 | else |
220 | { | 235 | { |