diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2020-03-05 14:13:39 +0200 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2020-03-05 14:13:39 +0200 |
commit | edb4373f7d2a32beb93a7f69ddcdf5e1bc0eb6a1 (patch) | |
tree | a6c84761b79f25ab1466e65d580b2598f9c7eb60 | |
parent | d2120bb28192504a3de76c0af15c5a04adffa206 (diff) |
SL-9775 FIXED EEP viewer crash when looking at the sun (which is playing parcel media)
-rw-r--r-- | indra/newview/llface.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llface.h | 4 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 4 |
4 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 174d8e34d1..59269c2115 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -168,7 +168,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mImportanceToCamera = 0.f ; mBoundingSphereRadius = 0.0f ; - mHasMedia = FALSE ; + mHasMedia = false ; + mIsMediaAllowed = true; } void LLFace::destroy() diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 0c5af5b579..c74d4e3fa8 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -218,6 +218,9 @@ public: void setHasMedia(bool has_media) { mHasMedia = has_media ;} BOOL hasMedia() const ; + void setMediaAllowed(bool is_media_allowed) { mIsMediaAllowed = is_media_allowed; } + BOOL isMediaAllowed() const { return mIsMediaAllowed; } + BOOL switchTexture() ; //vertex buffer tracking @@ -293,6 +296,7 @@ private: F32 mImportanceToCamera ; F32 mBoundingSphereRadius ; bool mHasMedia ; + bool mIsMediaAllowed; protected: diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f5f9d0d3cc..a2cec9a613 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3481,7 +3481,10 @@ BOOL LLViewerMediaTexture::findFaces() U32 end = tex->getNumFaces(ch); for(U32 i = 0; i < end; i++) { - mMediaFaceList.push_back((*face_list)[i]); + if ((*face_list)[i]->isMediaAllowed()) + { + mMediaFaceList.push_back((*face_list)[i]); + } } } } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 943704c8de..2037aca7e9 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -881,6 +881,10 @@ LLDrawable *LLVOSky::createDrawable(LLPipeline *pipeline) mFace[FACE_MOON] = mDrawable->addFace(poolp, nullptr); mFace[FACE_BLOOM] = mDrawable->addFace(poolp, nullptr); + mFace[FACE_SUN]->setMediaAllowed(false); + mFace[FACE_MOON]->setMediaAllowed(false); + mFace[FACE_BLOOM]->setMediaAllowed(false); + return mDrawable; } |