diff options
author | UbitUmarov | 2014-08-14 03:47:18 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-14 03:47:18 +0100 |
commit | ab4df26309dee8b973a38e43c975ba6e573701d5 (patch) | |
tree | ee23be027000125f6e94c71f2782556ed602e9dc | |
parent | *DANGER* dont send baked textures assets to Neighbours. Possible we could (diff) | |
download | opensim-SC_OLD-ab4df26309dee8b973a38e43c975ba6e573701d5.zip opensim-SC_OLD-ab4df26309dee8b973a38e43c975ba6e573701d5.tar.gz opensim-SC_OLD-ab4df26309dee8b973a38e43c975ba6e573701d5.tar.bz2 opensim-SC_OLD-ab4df26309dee8b973a38e43c975ba6e573701d5.tar.xz |
only try external baked texture module on login
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 186d82b..3c626ad 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -551,44 +551,54 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
551 | m_log.Debug("[ValidateBakedCache] have valid local cache"); | 551 | m_log.Debug("[ValidateBakedCache] have valid local cache"); |
552 | } | 552 | } |
553 | 553 | ||
554 | bool checkExternal = false; | ||
555 | |||
554 | if (!wearableCacheValid) | 556 | if (!wearableCacheValid) |
555 | { | 557 | { |
558 | ScenePresence ssp = null; | ||
559 | if (sp is ScenePresence) | ||
560 | { | ||
561 | ssp = (ScenePresence)sp; | ||
562 | checkExternal = (((uint)ssp.TeleportFlags & (uint)TeleportFlags.ViaLogin) != 0) && | ||
563 | bakedModule != null; | ||
564 | } | ||
565 | } | ||
566 | |||
567 | if (checkExternal) | ||
568 | { | ||
556 | hits = 0; | 569 | hits = 0; |
557 | bool gotbacked = false; | 570 | bool gotbacked = false; |
558 | 571 | ||
559 | if (bakedModule != null) | 572 | m_log.Debug("[ValidateBakedCache] local cache invalid, calling bakedModule"); |
573 | try | ||
560 | { | 574 | { |
561 | m_log.Debug("[ValidateBakedCache] local cache invalid, calling bakedModule"); | 575 | bakedModuleCache = bakedModule.Get(sp.UUID); |
562 | try | 576 | } |
563 | { | 577 | catch (Exception) |
564 | bakedModuleCache = bakedModule.Get(sp.UUID); | 578 | { |
565 | } | 579 | bakedModuleCache = null; |
566 | catch (Exception) | 580 | } |
567 | { | 581 | |
568 | bakedModuleCache = null; | 582 | if (bakedModuleCache != null) |
569 | } | 583 | { |
584 | m_log.Debug("[ValidateBakedCache] got bakedModule cache " + bakedModuleCache.Length); | ||
570 | 585 | ||
571 | if (bakedModuleCache != null) | 586 | for (int i = 0; i < bakedModuleCache.Length; i++) |
572 | { | 587 | { |
573 | m_log.Debug("[ValidateBakedCache] got bakedModule cache " + bakedModuleCache.Length); | 588 | int j = (int)bakedModuleCache[i].TextureIndex; |
574 | 589 | ||
575 | for (int i = 0; i < bakedModuleCache.Length; i++) | 590 | if (bakedModuleCache[i].TextureAsset != null) |
576 | { | 591 | { |
577 | int j = (int)bakedModuleCache[i].TextureIndex; | 592 | wearableCache[j].TextureID = bakedModuleCache[i].TextureID; |
578 | 593 | wearableCache[j].CacheId = bakedModuleCache[i].CacheId; | |
579 | if (bakedModuleCache[i].TextureAsset != null) | 594 | wearableCache[j].TextureAsset = bakedModuleCache[i].TextureAsset; |
580 | { | 595 | bakedModuleCache[i].TextureAsset.Temporary = true; |
581 | wearableCache[j].TextureID = bakedModuleCache[i].TextureID; | 596 | bakedModuleCache[i].TextureAsset.Local = true; |
582 | wearableCache[j].CacheId = bakedModuleCache[i].CacheId; | 597 | cache.Store(bakedModuleCache[i].TextureAsset); |
583 | wearableCache[j].TextureAsset = bakedModuleCache[i].TextureAsset; | 598 | |
584 | bakedModuleCache[i].TextureAsset.Temporary = true; | ||
585 | bakedModuleCache[i].TextureAsset.Local = true; | ||
586 | cache.Store(bakedModuleCache[i].TextureAsset); | ||
587 | |||
588 | } | ||
589 | } | 599 | } |
590 | gotbacked = true; | ||
591 | } | 600 | } |
601 | gotbacked = true; | ||
592 | } | 602 | } |
593 | 603 | ||
594 | if (gotbacked) | 604 | if (gotbacked) |