SL-9775 FIXED EEP viewer crash when looking at the sun (which is playing parcel media)

master
maxim_productengine 2020-03-05 14:13:39 +02:00
parent d2120bb281
commit edb4373f7d
4 changed files with 14 additions and 2 deletions

View File

@ -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()

View File

@ -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:

View File

@ -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]);
}
}
}
}

View File

@ -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;
}