diff options
| author | skolb <none@none> | 2009-12-11 09:07:39 -0800 |
|---|---|---|
| committer | skolb <none@none> | 2009-12-11 09:07:39 -0800 |
| commit | f0da8a742015bdc63d044cba6dc249b20b8f5b45 (patch) | |
| tree | b4240e8789f390bb4811d91490bcd7810bf657c3 /indra/newview/llviewermedia.cpp | |
| parent | 6542ffe2f05c47d74dfbe659041d956d609f91f3 (diff) | |
| parent | 0a8d9fa5b5d044bed7d4c38ec51d87bc90f3b3a6 (diff) | |
Merge media back into viewer 2-0
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1f24a68253..57e4ed0c1e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -630,7 +630,22 @@ bool LLViewerMedia::priorityComparitor(const LLViewerMediaImpl* i1, const LLView static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMediaImpl* i2) { - return (i1->getProximityDistance() < i2->getProximityDistance()); + if(i1->getProximityDistance() < i2->getProximityDistance()) + { + return true; + } + else if(i1->getProximityDistance() > i2->getProximityDistance()) + { + return false; + } + else + { + // Both objects have the same distance. This most likely means they're two faces of the same object. + // They may also be faces on different objects with exactly the same distance (like HUD objects). + // We don't actually care what the sort order is for this case, as long as it's stable and doesn't change when you enable/disable media. + // Comparing the impl pointers gives a completely arbitrary ordering, but it will be stable. + return (i1 < i2); + } } ////////////////////////////////////////////////////////////////////////////////////////// |
