aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs18
1 files changed, 4 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index d5f271d..2290c44 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -366,8 +366,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
366 // called on textures update 366 // called on textures update
367 public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems) 367 public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems)
368 { 368 {
369 bool defonly = true; // are we only using default textures
370
371 // uploaded baked textures will be in assets local cache 369 // uploaded baked textures will be in assets local cache
372 IAssetService cache = m_scene.AssetService; 370 IAssetService cache = m_scene.AssetService;
373 371
@@ -409,8 +407,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
409 continue; 407 continue;
410 } 408 }
411 409
412 defonly = false; // found a non-default texture reference
413
414 if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID) 410 if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID)
415 { 411 {
416 if(wearableCache[idx].CacheId != cacheItems[i].CacheId) 412 if(wearableCache[idx].CacheId != cacheItems[i].CacheId)
@@ -479,14 +475,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
479 sp.Appearance.WearableCacheItems[j].TextureID); 475 sp.Appearance.WearableCacheItems[j].TextureID);
480 } 476 }
481 477
482 // If we only found default textures, then the appearance is not cached 478 return (hits == cacheItems.Length);
483 return (defonly ? false : true);
484 } 479 }
485 480
486 // called when we get a new root avatar 481 // called when we get a new root avatar
487 public bool ValidateBakedTextureCache(IScenePresence sp) 482 public bool ValidateBakedTextureCache(IScenePresence sp)
488 { 483 {
489 bool defonly = true; // are we only using default textures
490 int hits = 0; 484 int hits = 0;
491 485
492 lock (m_setAppearanceLock) 486 lock (m_setAppearanceLock)
@@ -557,10 +551,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
557 551
558 // this should be removed 552 // this should be removed
559 if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) 553 if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE)
560 {
561 defonly = false; // found a non-default texture reference
562 hits++; 554 hits++;
563 } 555
564 continue; 556 continue;
565 } 557 }
566 else 558 else
@@ -608,7 +600,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
608 } 600 }
609 else 601 else
610 hits++; 602 hits++;
611 defonly = false; // found a non-default texture reference
612 } 603 }
613 } 604 }
614 } 605 }
@@ -616,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
616 sp.Appearance.WearableCacheItems = wearableCache; 607 sp.Appearance.WearableCacheItems = wearableCache;
617 } 608 }
618 609
619 m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2} {3}", sp.Name, sp.UUID, hits, defonly.ToString()); 610 m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2}", sp.Name, sp.UUID, hits);
620 // debug 611 // debug
621 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) 612 for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++)
622 { 613 {
@@ -627,10 +618,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
627 sp.Appearance.WearableCacheItems[j].TextureID); 618 sp.Appearance.WearableCacheItems[j].TextureID);
628 } 619 }
629 620
630 // If we only found default textures, then the appearance is not cached
631 // return (defonly ? false : true);
632 return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional 621 return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional
633 } 622 }
623
634 public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) 624 public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
635 { 625 {
636 int texturesRebaked = 0; 626 int texturesRebaked = 0;