summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-04 09:03:00 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-04 09:03:00 -0700
commitb570ee5fbc0953d358b33c99a6c7007bf681d717 (patch)
tree955aef6bf0e0a40f6c0bad763ddbac1d6fb4a2f4
parent44ac5dc9377915d5d1a31dc3d52423d07b4d7f02 (diff)
parenta77d273e3ab448d84507bfdb763df8335eadea9e (diff)
Merged from viewer-public
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llagentwearables.cpp13
-rw-r--r--indra/newview/llvoavatarself.cpp10
3 files changed, 16 insertions, 9 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 0dc12ab042..fc9fe0fdd8 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -583,7 +583,7 @@
<key>Type</key>
<string>U32</string>
<key>Value</key>
- <integer>0</integer>
+ <integer>180</integer>
</map>
<key>AvatarSex</key>
<map>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e0104eddf0..d823a3cbbb 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1638,10 +1638,6 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur
{
LLUUID asset_id = wearable->getAssetID();
hash.update((const unsigned char*)asset_id.mData, UUID_BYTES);
- if (!generate_valid_hash)
- {
- hash.update((const unsigned char*)asset_id.mData, UUID_BYTES);
- }
hash_computed = true;
}
}
@@ -1649,6 +1645,15 @@ LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextur
if (hash_computed)
{
hash.update((const unsigned char*)baked_dict->mWearablesHashID.mData, UUID_BYTES);
+
+ // Add some garbage into the hash so that it becomes invalid.
+ if (!generate_valid_hash)
+ {
+ if (isAgentAvatarValid())
+ {
+ hash.update((const unsigned char*)gAgentAvatarp->getID().mData, UUID_BYTES);
+ }
+ }
hash.finalize();
hash.raw_digest(hash_id.mData);
}
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 462c442954..e18b617120 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1273,7 +1273,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataAvailable(const LLTexLayerSet* layerset)
//-----------------------------------------------------------------------------
BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) const
{
- const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+ //const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+ const U32 desired_tex_discard_level = 0; // SERAPH hack to not bake textures on lower discard levels.
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
@@ -1289,7 +1290,7 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons
const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
{
- if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level))
+ if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level))
{
return FALSE;
}
@@ -1304,7 +1305,8 @@ BOOL LLVOAvatarSelf::isLocalTextureDataFinal(const LLTexLayerSet* layerset) cons
BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
{
- const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+ // const U32 desired_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel");
+ const U32 desired_tex_discard_level = 0; // SERAPH hack to not bake textures on lower discard levels
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
{
@@ -1318,7 +1320,7 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const
const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type);
for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++)
{
- if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(override_tex_discard_level))
+ if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level))
{
return FALSE;
}