summaryrefslogtreecommitdiff
path: root/indra/newview/lltexlayer.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-29 12:00:26 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-29 12:00:26 -0400
commit94e6e10739c8321b6fb651a109901380ef92975a (patch)
tree629fec2892c2bb0bce4f35f42ef4cad54408f174 /indra/newview/lltexlayer.cpp
parent46fe5d49caef6c8db3df9d88f0d0ec773ef28095 (diff)
EXT-6536 : Make LLVOAvatarSelf a singleton
Superficial cleanup to replace all instances of "LLVOAvatarSelf *avatarp = gAgent.getAvatarObject" with "gAgentAvatar".
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r--indra/newview/lltexlayer.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 21c928282a..6461ec8221 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -284,8 +284,6 @@ void LLTexLayerSetBuffer::readBackAndUpload()
llinfos << "Baked " << mTexLayerSet->getBodyRegion() << llendl;
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES);
- llassert( gAgent.getAvatarObject() == mTexLayerSet->getAvatar() );
-
// We won't need our caches since we're baked now. (Techically, we won't
// really be baked until this image is sent to the server and the Avatar
// Appearance message is received.)
@@ -352,7 +350,7 @@ void LLTexLayerSetBuffer::readBackAndUpload()
{
// baked_upload_data is owned by the responder and deleted after the request completes
LLBakedUploadData* baked_upload_data =
- new LLBakedUploadData(gAgent.getAvatarObject(), this->mTexLayerSet, asset_id);
+ new LLBakedUploadData(gAgentAvatar, this->mTexLayerSet, asset_id);
mUploadID = asset_id;
// upload the image
@@ -409,12 +407,10 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
{
LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata;
- LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
-
if (0 == result &&
- avatarp &&
- !avatarp->isDead() &&
- baked_upload_data->mAvatar == avatarp && // Sanity check: only the user's avatar should be uploading textures.
+ isAgentAvatarValid() &&
+ !gAgentAvatar->isDead() &&
+ baked_upload_data->mAvatar == gAgentAvatar && // Sanity check: only the user's avatar should be uploading textures.
baked_upload_data->mTexLayerSet->hasComposite()
)
{
@@ -439,11 +435,11 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
if (result >= 0)
{
- LLVOAvatarDefines::ETextureIndex baked_te = avatarp->getBakedTE(layerset_buffer->mTexLayerSet);
+ LLVOAvatarDefines::ETextureIndex baked_te = gAgentAvatar->getBakedTE(layerset_buffer->mTexLayerSet);
// Update baked texture info with the new UUID
U64 now = LLFrameTimer::getTotalTime(); // Record starting time
llinfos << "Baked texture upload took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl;
- avatarp->setNewBakedTexture(baked_te, uuid);
+ gAgentAvatar->setNewBakedTexture(baked_te, uuid);
}
else
{
@@ -457,7 +453,7 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid,
llinfos << "Received baked texture out of date, ignored." << llendl;
}
- avatarp->dirtyMesh();
+ gAgentAvatar->dirtyMesh();
}
else
{