diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-23 13:44:56 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-23 13:44:56 -0800 |
commit | e09f8e651a87e92a64c49bf0107dc7fee80bc5ef (patch) | |
tree | 2db160d79ba3f5dc2a80ad9148685d1fdac1d2dd /indra/newview | |
parent | 619cda179d28a9d62732a952d349dff76fd57180 (diff) |
SH-2712 FIX -- added caching to isFullyLoaded
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llvoavatar.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a3550000df..d69d1a7962 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -690,7 +690,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mFullyLoadedInitialized(FALSE), mSupportsAlphaLayers(FALSE), mLoadedCallbacksPaused(FALSE), - mHasPelvisOffset( FALSE ) + mHasPelvisOffset( FALSE ), + mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")) { LLMemType mt(LLMemType::MTYPE_AVATAR); //VTResume(); // VTune @@ -6493,10 +6494,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) BOOL LLVOAvatar::isFullyLoaded() const { - if (gSavedSettings.getBOOL("RenderUnloadedAvatar")) - return TRUE; - else - return mFullyLoaded; + return (mRenderUnloadedAvatar || mFullyLoaded); } bool LLVOAvatar::isTooComplex() const diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index e53b8e3f4b..59796370ae 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -40,6 +40,7 @@ #include "lldrawpoolalpha.h" #include "llviewerobject.h" #include "llcharacter.h" +#include "llcontrol.h" #include "llviewerjointmesh.h" #include "llviewerjointattachment.h" #include "llrendertarget.h" @@ -450,6 +451,8 @@ private: F32 mImpostorDistance; F32 mImpostorPixelArea; LLVector3 mLastAnimExtents[2]; + + LLCachedControl<bool> mRenderUnloadedAvatar; //-------------------------------------------------------------------- // Wind rippling in clothes |