diff options
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 54379dece3..c400e8510e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -755,11 +755,6 @@ LLVOAvatar::~LLVOAvatar() { lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; - if (isSelf()) - { - gAgent.setAvatarObject(NULL); - } - mRoot.removeAllChildren(); deleteAndClearArray(mSkeleton); @@ -965,15 +960,14 @@ void LLVOAvatar::dumpBakedStatus() //static void LLVOAvatar::restoreGL() { - LLVOAvatar* self = gAgent.getAvatarObject(); - if (!self) - return; - self->setCompositeUpdatesEnabled(TRUE); - for (U32 i = 0; i < self->mBakedTextureDatas.size(); i++) + if (!isAgentAvatarValid()) return; + + gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); + for (U32 i = 0; i < gAgentAvatarp->mBakedTextureDatas.size(); i++) { - self->invalidateComposite(self->mBakedTextureDatas[i].mTexLayerSet, FALSE); + gAgentAvatarp->invalidateComposite(gAgentAvatarp->mBakedTextureDatas[i].mTexLayerSet, FALSE); } - self->updateMeshTextures(); + gAgentAvatarp->updateMeshTextures(); } //static @@ -2085,7 +2079,7 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, if(retval & LLViewerObject::INVALID_UPDATE) { - if(this == gAgent.getAvatarObject()) + if (isSelf()) { //tell sim to cancel this update gAgent.teleportViaLocation(gAgent.getPositionGlobal()); @@ -2254,7 +2248,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) else { llinfos << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << llendl; } // this is the call that Karl S. created for triggering gestures from within the code. - LLGestureManager::instance().triggerAndReviseString( gestureString ); + LLGestureMgr::instance().triggerAndReviseString( gestureString ); } } @@ -2547,7 +2541,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() llinfos << "self isFullyLoaded, first_fully_visible" << llendl; first_fully_visible = false; - LLAppearanceManager::instance().onFirstFullyVisible(); + LLAppearanceMgr::instance().onFirstFullyVisible(); } } if (isFullyLoaded()) @@ -6859,8 +6853,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) // static void LLVOAvatar::dumpArchetypeXML( void* ) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLAPRFile outfile ; + LLAPRFile outfile; outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml"), LL_APR_WB ); apr_file_t* file = outfile.getFileHandle() ; if (!file) @@ -6878,7 +6871,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) const std::string& wearable_name = LLWearableDictionary::getTypeName((EWearableType)type); apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() ); - for (LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam()) + for (LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam()) { LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param; if( (viewer_param->getWearableType() == type) && @@ -6894,7 +6887,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te) == type) { // MULTIPLE_WEARABLES: extend to multiple wearables? - LLViewerTexture* te_image = avatar->getImage((ETextureIndex)te, 0); + LLViewerTexture* te_image = ((LLVOAvatar *)(gAgentAvatarp))->getImage((ETextureIndex)te, 0); if( te_image ) { std::string uuid_str; |