diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 878d2fa..97b540a 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -420,16 +420,18 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
420 | continue; | 420 | continue; |
421 | } | 421 | } |
422 | */ | 422 | */ |
423 | |||
424 | wearableCache[idx].TextureAsset = null; | 423 | wearableCache[idx].TextureAsset = null; |
425 | if (cache != null) | 424 | if (cache != null) |
426 | wearableCache[idx].TextureAsset = cache.GetCached(face.TextureID.ToString()); | 425 | wearableCache[idx].TextureAsset = cache.GetCached(face.TextureID.ToString()); |
427 | 426 | ||
428 | if (wearableCache[idx].TextureAsset != null) | 427 | if (wearableCache[idx].TextureAsset != null) |
429 | { | 428 | { |
430 | wearableCache[idx].CacheId = cacheItems[i].CacheId; | 429 | if ( wearableCache[idx].TextureID != face.TextureID || |
430 | wearableCache[idx].CacheId != cacheItems[i].CacheId) | ||
431 | validDirtyBakes++; | ||
432 | |||
431 | wearableCache[idx].TextureID = face.TextureID; | 433 | wearableCache[idx].TextureID = face.TextureID; |
432 | validDirtyBakes++; | 434 | wearableCache[idx].CacheId = cacheItems[i].CacheId; |
433 | hits++; | 435 | hits++; |
434 | } | 436 | } |
435 | else | 437 | else |
@@ -444,11 +446,15 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
444 | } | 446 | } |
445 | 447 | ||
446 | sp.Appearance.WearableCacheItems = wearableCache; | 448 | sp.Appearance.WearableCacheItems = wearableCache; |
447 | 449 | ||
448 | // if we got a full set of baked textures save all in BakedTextureModule | 450 | if (missing.Count > 0) |
449 | |||
450 | if (validDirtyBakes > 0 && hits == cacheItems.Length) | ||
451 | { | 451 | { |
452 | foreach (UUID id in missing) | ||
453 | sp.ControllingClient.SendRebakeAvatarTextures(id); | ||
454 | } | ||
455 | else if (validDirtyBakes > 0 && hits == cacheItems.Length) | ||
456 | { | ||
457 | // if we got a full set of baked textures save all in BakedTextureModule | ||
452 | if (m_BakedTextureModule != null) | 458 | if (m_BakedTextureModule != null) |
453 | { | 459 | { |
454 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); | 460 | m_log.Debug("[UpdateBakedCache] uploading to bakedModule cache"); |
@@ -466,11 +472,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
466 | } | 472 | } |
467 | } | 473 | } |
468 | 474 | ||
469 | if(missing.Count > 0) | ||
470 | { | ||
471 | foreach(UUID id in missing) | ||
472 | sp.ControllingClient.SendRebakeAvatarTextures(id); | ||
473 | } | ||
474 | 475 | ||
475 | // debug | 476 | // debug |
476 | m_log.Debug("[UpdateBakedCache] cache hits: " + hits.ToString() + " changed entries: " + validDirtyBakes.ToString() + " rebakes " + missing.Count); | 477 | m_log.Debug("[UpdateBakedCache] cache hits: " + hits.ToString() + " changed entries: " + validDirtyBakes.ToString() + " rebakes " + missing.Count); |