From 37e701dba91985ddeaa4704d846f533331c95216 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 1 Dec 2009 16:21:29 -0800 Subject: Fix for EXT-2836 (Changing texture on Media on a Prim face removes MoaP functionality). LLVOVolume::regenFaces() (specifically the calls to facep->setTexture()) breaks associations between faces and LLViewerMediaTexture objects when called on a prim with playing media. This change adds code which recreates the associations. --- indra/newview/llvovolume.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1ee0811ba6..367912f45e 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1134,6 +1134,20 @@ void LLVOVolume::regenFaces() facep->setTEOffset(i); facep->setTexture(getTEImage(i)); facep->setViewerObject(this); + + // If the face had media on it, this will have broken the link between the LLViewerMediaTexture and the face. + // Re-establish the link. + if(mMediaImplList.size() > i) + { + if(mMediaImplList[i]) + { + LLViewerMediaTexture* media_tex = LLViewerTextureManager::findMediaTexture(mMediaImplList[i]->getMediaTextureID()) ; + if(media_tex) + { + media_tex->addMediaToFace(facep) ; + } + } + } } if (!count_changed) -- cgit v1.2.3 From 9ad99e17734f1898071ec68ed11617f48701eb28 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 1 Dec 2009 19:19:41 -0800 Subject: Fix a signed/unsigned warning that breaks the Windows build. --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 367912f45e..cf61994fea 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1137,7 +1137,7 @@ void LLVOVolume::regenFaces() // If the face had media on it, this will have broken the link between the LLViewerMediaTexture and the face. // Re-establish the link. - if(mMediaImplList.size() > i) + if((int)mMediaImplList.size() > i) { if(mMediaImplList[i]) { -- cgit v1.2.3