diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8888879b8a93c7d71a1e44dbf4a764849f166a70..760eee17f30f3241e11517a3e20382147f4ecbf7 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -727,6 +727,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, { LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this); } + + mVisuallyMuteSetting = getSavedVisualMuteSettings(); } std::string LLVOAvatar::avString() const @@ -9228,12 +9230,26 @@ void LLVOAvatar::calculateUpdateRenderComplexity() } } +//static +std::map<LLUUID, LLVOAvatar::VisualMuteSettings> LLVOAvatar::sVisuallyMuteSettingsMap; + void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; mNeedsImpostorUpdate = TRUE; + sVisuallyMuteSettingsMap[getID()] = set; } +LLVOAvatar::VisualMuteSettings LLVOAvatar::getSavedVisualMuteSettings() +{ + std::map<LLUUID, VisualMuteSettings>::iterator iter = sVisuallyMuteSettingsMap.find(getID()); + if (iter != sVisuallyMuteSettingsMap.end()) + { + return iter->second; + } + + return AV_RENDER_NORMALLY; +} void LLVOAvatar::calcMutedAVColor() { diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index bd89d4ef23ab7b8bd2cad23d0a5546418deb6dc8..73e4fbd108bdbfa5b8b9c1443015f52d140e5a51 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -407,6 +407,7 @@ class LLVOAvatar : }; void setVisualMuteSettings(VisualMuteSettings set); VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; + VisualMuteSettings getSavedVisualMuteSettings(); U32 renderRigid(); U32 renderSkinned(); @@ -440,6 +441,7 @@ class LLVOAvatar : VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV + static std::map<LLUUID, VisualMuteSettings> sVisuallyMuteSettingsMap; //-------------------------------------------------------------------- // Morph masks //--------------------------------------------------------------------