From 5bd5a474dd5582047fdbde2f0def0035db8b504a Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 3 Mar 2017 17:26:07 +0200 Subject: MAINT-7168 SL Viewer should remember avatar rendering selection --- indra/newview/llvoavatar.cpp | 16 ++++++++++++++++ indra/newview/llvoavatar.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 8888879b8a..760eee17f3 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 LLVOAvatar::sVisuallyMuteSettingsMap; + void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set) { mVisuallyMuteSetting = set; mNeedsImpostorUpdate = TRUE; + sVisuallyMuteSettingsMap[getID()] = set; } +LLVOAvatar::VisualMuteSettings LLVOAvatar::getSavedVisualMuteSettings() +{ + std::map::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 bd89d4ef23..73e4fbd108 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -407,6 +407,7 @@ public: }; void setVisualMuteSettings(VisualMuteSettings set); VisualMuteSettings getVisualMuteSettings() { return mVisuallyMuteSetting; }; + VisualMuteSettings getSavedVisualMuteSettings(); U32 renderRigid(); U32 renderSkinned(); @@ -440,6 +441,7 @@ public: VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV + static std::map sVisuallyMuteSettingsMap; //-------------------------------------------------------------------- // Morph masks //-------------------------------------------------------------------- -- cgit v1.2.3