summaryrefslogtreecommitdiff
path: root/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnetmap.cpp')
-rw-r--r--indra/newview/llnetmap.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 754c096296..ffb3bad2aa 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -29,11 +29,13 @@
#include "llstatgraph.h"
#include "llsurface.h"
#include "lltextbox.h"
+#include "lluuid.h"
#include "llviewercamera.h"
#include "llviewerimage.h"
#include "llviewerimagelist.h"
#include "llviewermenu.h"
#include "llviewerobjectlist.h"
+#include "llviewermenu.h"
#include "llviewerparceloverlay.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
@@ -381,6 +383,8 @@ void LLNetMap::draw()
LLVector3 pos_local;
U32 compact_local;
U8 bits;
+ // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
+ // just be careful to sort the avatar IDs along with the positions. -MG
for (i = 0; i < count; i++)
{
compact_local = regionp->mMapAvatars.get(i);
@@ -400,9 +404,15 @@ void LLNetMap::draw()
pos_global += origin_global;
pos_map = globalPosToView(pos_global);
- LLWorldMapView::drawAvatar(pos_map.mV[VX], pos_map.mV[VY],
- gAvatarMapColor,
- pos_map.mV[VZ]);
+
+ LLUUID avatar_id = regionp->mMapAvatarIDs.get(i);
+ BOOL show_as_friend =
+ //is_agent_mappable(avatar_id); // if we're only highlighting mappable friends
+ is_agent_friend(avatar_id); // if we're always highlighting friends
+ LLWorldMapView::drawAvatar(
+ pos_map.mV[VX], pos_map.mV[VY],
+ show_as_friend ? gFriendMapColor : gAvatarMapColor,
+ pos_map.mV[VZ]);
}
}