diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-18 16:08:39 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-18 16:08:39 -0800 |
commit | aa7efb7540d9eed9d8832bb65c52c3fdb1b811c8 (patch) | |
tree | d74df2438d1d62b6c2c683a12bcd42d8dee6e41b /indra/newview/llavatarlist.cpp | |
parent | 043407238a4162c0d20413338cf6a7088be1f674 (diff) | |
parent | 4964ca39f14531630ffbfece593f8ba9cdc86e4e (diff) |
merge.
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r-- | indra/newview/llavatarlist.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 3bd4f898c8..71b23e1383 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llavatarlist.h" +#include "llagent.h" // for comparator // newview #include "llcallingcard.h" // for LLAvatarTracker @@ -420,3 +421,17 @@ bool LLAvatarItemNameComparator::doCompare(const LLAvatarListItem* avatar_item1, return name1 < name2; } +bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const +{ + //keep agent on top, if first is agent, + //then we need to return true to elevate this id, otherwise false. + if(avatar_item1->getAvatarId() == gAgent.getID()) + { + return true; + } + else if (avatar_item2->getAvatarId() == gAgent.getID()) + { + return false; + } + return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2); +} |