summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2009-11-19 11:43:47 +0800
committerangela <angela@lindenlab.com>2009-11-19 11:43:47 +0800
commit6e5f529a7adb53fa021986aed6e6b1b229cc0efd (patch)
treea031044cfb6618a5b36a0e80d0fc3a918dfa07a9 /indra/newview/llvoavatarself.cpp
parenta35fbddb910fa0dd068622c3dc64af1b27ca19b7 (diff)
parent81eca4a7823f7fa06327b8185b6603d1f3c9ac9a (diff)
branch merge
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 711e9f90fc..d9c5e932a2 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2074,6 +2074,49 @@ void LLVOAvatarSelf::setInvisible(BOOL newvalue)
}
}
+// HACK: this will null out the avatar's local texture IDs before the TE message is sent
+// to ensure local texture IDs are not sent to other clients in the area.
+// this is a short-term solution. The long term solution will be to not set the texture
+// IDs in the avatar object, and keep them only in the wearable.
+// This will involve further refactoring that is too risky for the initial release of 2.0.
+bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
+{
+ LLUUID texture_id[TEX_NUM_INDICES];
+ // pack away current TEs to make sure we don't send them out
+ for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
+ iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
+ ++iter)
+ {
+ const ETextureIndex index = iter->first;
+ const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
+ if (!texture_dict->mIsBakedTexture)
+ {
+ LLTextureEntry* entry = getTE((U8) index);
+ texture_id[index] = entry->getID();
+ entry->setID(IMG_DEFAULT_AVATAR);
+ }
+ }
+
+ bool success = packTEMessage(mesgsys);
+
+ // unpack TEs to make sure we don't re-trigger a bake
+ for (LLVOAvatarDictionary::Textures::const_iterator iter = LLVOAvatarDictionary::getInstance()->getTextures().begin();
+ iter != LLVOAvatarDictionary::getInstance()->getTextures().end();
+ ++iter)
+ {
+ const ETextureIndex index = iter->first;
+ const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second;
+ if (!texture_dict->mIsBakedTexture)
+ {
+ LLTextureEntry* entry = getTE((U8) index);
+ entry->setID(texture_id[index]);
+ }
+ }
+
+ return success;
+}
+
+
//------------------------------------------------------------------------
// needsRenderBeam()
//------------------------------------------------------------------------