summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llface.cpp10
-rw-r--r--indra/newview/llfloatersearch.cpp9
-rw-r--r--indra/newview/llviewertexture.cpp37
-rw-r--r--indra/newview/llviewertexture.h9
-rw-r--r--indra/newview/llvopartgroup.cpp6
5 files changed, 34 insertions, 37 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 0276cd9a24..09b3ce1e86 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -278,16 +278,6 @@ void LLFace::setTexture(LLViewerTexture* tex)
}
mTexture = tex ;
-
- //check if this texture is replaced by a parcel media texture.
- if(mTexture.notNull() && mTexture->hasParcelMedia())
- {
- LLViewerMediaTexture* mediap = LLViewerTextureManager::findMediaTexture(mTexture->getID()) ;
- if(mediap)
- {
- mediap->addMediaToFace(this) ;
- }
- }
}
void LLFace::dirtyTexture()
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 4c83530f43..bd9798c18e 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -34,6 +34,7 @@
#include "llviewerprecompiledheaders.h"
#include "llfloatersearch.h"
#include "llmediactrl.h"
+#include "llagent.h"
LLFloaterSearch::LLFloaterSearch(const LLSD& key) :
@@ -117,6 +118,14 @@ void LLFloaterSearch::search(const LLSD &key)
std::string search_text = key.has("id") ? key["id"].asString() : "";
url += std::string("?q=") + search_text;
+ // append the maturity and teen capabilities for this agent
+ BOOL godlike = gAgent.isGodlike();
+ bool mature_enabled = gAgent.canAccessMature() || godlike;
+ bool adult_enabled = gAgent.canAccessAdult() || godlike;
+ std::string mature = (mature_enabled) ? "True" : "False";
+ std::string teen = (!adult_enabled) ? "True" : "False";
+ url += "&t=" + teen + "&m=" + mature;
+
// and load the URL in the web view
mBrowser->navigateTo(url);
}
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 28ef128265..758bf8c1aa 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -416,7 +416,7 @@ void LLViewerTexture::init(bool firstinit)
mDontDiscard = FALSE;
mMaxVirtualSize = 0.f;
mNeedsResetMaxVirtualSize = FALSE ;
- mHasParcelMedia = FALSE ;
+ mParcelMedia = NULL ;
}
//virtual
@@ -2148,6 +2148,12 @@ void LLViewerMediaTexture::updateClass()
{
static const F32 MAX_INACTIVE_TIME = 30.f ;
+#if 0
+ //force to play media.
+ gSavedSettings.setBOOL("AudioSteamingMedia", true) ;
+ gSavedSettings.setBOOL("AudioStreamingVideo", true) ;
+#endif
+
for(media_map_t::iterator iter = sMediaMap.begin() ; iter != sMediaMap.end(); )
{
LLViewerMediaTexture* mediap = iter->second;
@@ -2221,17 +2227,17 @@ LLViewerMediaTexture::LLViewerMediaTexture(const LLUUID& id, BOOL usemipmaps, LL
LLViewerTexture* tex = gTextureList.findImage(mID) ;
if(tex) //this media is a parcel media for tex.
{
- tex->setParcelMedia(TRUE) ;
- mParcelTexture = tex ;
+ tex->setParcelMedia(this) ;
}
}
//virtual
LLViewerMediaTexture::~LLViewerMediaTexture()
{
- if(mParcelTexture.notNull())
+ LLViewerTexture* tex = gTextureList.findImage(mID) ;
+ if(tex) //this media is a parcel media for tex.
{
- mParcelTexture->setParcelMedia(FALSE) ;
+ tex->setParcelMedia(NULL) ;
}
}
@@ -2283,21 +2289,11 @@ BOOL LLViewerMediaTexture::findFaces()
mMediaFaceList.clear() ;
BOOL ret = TRUE ;
-
- //for parcel media
- if(mParcelTexture.isNull())
- {
- LLViewerTexture* tex = gTextureList.findImage(mID) ;
- if(tex)
- {
- tex->setParcelMedia(TRUE) ;
- mParcelTexture = tex ;
- }
- }
- if(mParcelTexture.notNull())
+ LLViewerTexture* tex = gTextureList.findImage(mID) ;
+ if(tex) //this media is a parcel media for tex.
{
- const ll_face_list_t* face_list = mParcelTexture->getFaceList() ;
+ const ll_face_list_t* face_list = tex->getFaceList() ;
for(ll_face_list_t::const_iterator iter = face_list->begin(); iter != face_list->end(); ++iter)
{
mMediaFaceList.push_back(*iter) ;
@@ -2404,11 +2400,6 @@ void LLViewerMediaTexture::addFace(LLFace* facep)
if(facep->getTexture() && facep->getTexture() != this && facep->getTexture()->getID() == mID)
{
mTextureList.push_back(facep->getTexture()) ; //a parcel media.
- if(mParcelTexture.isNull())
- {
- mParcelTexture = facep->getTexture() ;
- mParcelTexture->setParcelMedia(TRUE) ;
- }
return ;
}
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index ce8c47b878..020478beef 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -221,8 +221,9 @@ public:
BOOL getDontDiscard() const { return mDontDiscard; }
//-----------------
- void setParcelMedia(BOOL has_media) {mHasParcelMedia = has_media;}
- BOOL hasParcelMedia() const { return mHasParcelMedia ;}
+ void setParcelMedia(LLViewerMediaTexture* media) {mParcelMedia = media;}
+ BOOL hasParcelMedia() const { return mParcelMedia != NULL;}
+ LLViewerMediaTexture* getParcelMedia() const { return mParcelMedia;}
/*virtual*/ void updateBindStatsForTester() ;
protected:
@@ -250,7 +251,8 @@ protected:
LLPointer<LLImageGL> mGLTexturep ;
S8 mDontDiscard; // Keep full res version of this image (for UI, etc)
- BOOL mHasParcelMedia ;
+ //do not use LLPointer here.
+ LLViewerMediaTexture* mParcelMedia ;
protected:
typedef enum
@@ -552,7 +554,6 @@ private:
LLViewerMediaImpl* mMediaImplp ;
BOOL mIsPlaying ;
U32 mUpdateVirtualSizeTime ;
- LLPointer< LLViewerTexture > mParcelTexture ; //the texture replaces this media texure when it is a parcel media texture.
public:
static void updateClass() ;
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 7585842623..143cd2d9c6 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -249,6 +249,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
facep->mCenterLocal = part->mPosAgent;
facep->setFaceColor(part->mColor);
facep->setTexture(part->mImagep);
+
+ //check if this particle texture is replaced by a parcel media texture.
+ if(part->mImagep.notNull() && part->mImagep->hasParcelMedia())
+ {
+ part->mImagep->getParcelMedia()->addMediaToFace(facep) ;
+ }
mPixelArea = tot_area * pixel_meter_ratio;
const F32 area_scale = 10.f; // scale area to increase priority a bit