summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2009-11-09 18:41:55 -0800
committerMonroe Linden <monroe@lindenlab.com>2009-11-09 18:41:55 -0800
commitca1356d4655223781b5e317b430c67fcb081249c (patch)
treec15e10885a8568cd64c85054e374680992aab29d /indra/newview/llviewermedia.cpp
parent4be7fa99e743732942a412fac5db4770d198999d (diff)
LLViewerMediaImpl now keeps track of which instance is the current parcel media instance.
The active parcel media instance always gets priority over other inworld media.
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 11c1fcb1ea..69650425cb 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -459,12 +459,12 @@ LLViewerMedia::impl_list &LLViewerMedia::getPriorityList()
// This is the predicate function used to sort sViewerMediaImplList by priority.
bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2)
{
- if(i1->isForcedUnloaded())
+ if(i1->isForcedUnloaded() && !i2->isForcedUnloaded())
{
// Muted or failed items always go to the end of the list, period.
return false;
}
- else if(i2->isForcedUnloaded())
+ else if(i2->isForcedUnloaded() && !i1->isForcedUnloaded())
{
// Muted or failed items always go to the end of the list, period.
return true;
@@ -489,6 +489,16 @@ bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLView
// i2 is a UI element, i1 is not. This makes i2 "less than" i1, so it sorts earlier in our list.
return false;
}
+ else if(i1->isParcelMedia())
+ {
+ // The parcel media impl sorts above all other inworld media, unless one has focus.
+ return true;
+ }
+ else if(i2->isParcelMedia())
+ {
+ // The parcel media impl sorts above all other inworld media, unless one has focus.
+ return false;
+ }
else
{
// The object with the larger interest value should be earlier in the list, so we reverse the sense of the comparison here.
@@ -686,6 +696,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mPreviousMediaState(MEDIA_NONE),
mPreviousMediaTime(0.0f),
mIsDisabled(false),
+ mIsParcelMedia(false),
mProximity(-1),
mIsUpdated(false)
{