diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-03-29 17:53:21 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-03-29 17:53:21 +0100 |
commit | eb0aaff4aac1dcf9f238242c107df650584efdf9 (patch) | |
tree | b07b612c33f23e820492b06488a8c406856b64c8 /indra/newview/lltexlayer.cpp | |
parent | fc0906d6e8c1238fe7fd21c185957ca89511e76e (diff) | |
parent | b6e7850c0a3d65ed0a1501e19a1655055000e32f (diff) |
Merge
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r-- | indra/newview/lltexlayer.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 21c928282a..3f4dab4fea 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(gAgentAvatarp, 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() && + !gAgentAvatarp->isDead() && + baked_upload_data->mAvatar == gAgentAvatarp && // 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 = gAgentAvatarp->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); + gAgentAvatarp->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(); + gAgentAvatarp->dirtyMesh(); } else { |