summaryrefslogtreecommitdiff
path: root/indra/newview/llagentwearables.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-06-04 10:23:11 -0400
committerLoren Shih <seraph@lindenlab.com>2010-06-04 10:23:11 -0400
commit0309a18d1ae746d06803b222b48a4ffb6eeafdf3 (patch)
treeb5ba642f86be0ee69200a14eb55dfd24c2461d51 /indra/newview/llagentwearables.cpp
parent78e017c881a89d7f7fed798a994c318c8129cccb (diff)
EXT-7628 FIXED Don't cache lower res baked textures
Changed hash mangling algorithm slightly.
Diffstat (limited to 'indra/newview/llagentwearables.cpp')
-rw-r--r--indra/newview/llagentwearables.cpp13
1 files changed, 9 insertions, 4 deletions
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);
}