diff options
Diffstat (limited to 'linden/indra/newview/llnetmap.cpp')
-rw-r--r-- | linden/indra/newview/llnetmap.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 4701aae..edf2567 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | * @author James Cook | 3 | * @author James Cook |
4 | * @brief Display of surrounding regions, objects, and agents. View contained by LLFloaterMap. | 4 | * @brief Display of surrounding regions, objects, and agents. View contained by LLFloaterMap. |
5 | * | 5 | * |
6 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
7 | * | ||
6 | * Copyright (c) 2001-2007, Linden Research, Inc. | 8 | * Copyright (c) 2001-2007, Linden Research, Inc. |
7 | * | 9 | * |
8 | * Second Life Viewer Source Code | 10 | * Second Life Viewer Source Code |
@@ -25,6 +27,7 @@ | |||
25 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 27 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
26 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 28 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
27 | * COMPLETENESS OR PERFORMANCE. | 29 | * COMPLETENESS OR PERFORMANCE. |
30 | * $/LicenseInfo$ | ||
28 | */ | 31 | */ |
29 | 32 | ||
30 | #include "llviewerprecompiledheaders.h" | 33 | #include "llviewerprecompiledheaders.h" |
@@ -49,11 +52,13 @@ | |||
49 | #include "llstatgraph.h" | 52 | #include "llstatgraph.h" |
50 | #include "llsurface.h" | 53 | #include "llsurface.h" |
51 | #include "lltextbox.h" | 54 | #include "lltextbox.h" |
55 | #include "lluuid.h" | ||
52 | #include "llviewercamera.h" | 56 | #include "llviewercamera.h" |
53 | #include "llviewerimage.h" | 57 | #include "llviewerimage.h" |
54 | #include "llviewerimagelist.h" | 58 | #include "llviewerimagelist.h" |
55 | #include "llviewermenu.h" | 59 | #include "llviewermenu.h" |
56 | #include "llviewerobjectlist.h" | 60 | #include "llviewerobjectlist.h" |
61 | #include "llviewermenu.h" | ||
57 | #include "llviewerparceloverlay.h" | 62 | #include "llviewerparceloverlay.h" |
58 | #include "llviewerregion.h" | 63 | #include "llviewerregion.h" |
59 | #include "llviewerwindow.h" | 64 | #include "llviewerwindow.h" |
@@ -401,6 +406,8 @@ void LLNetMap::draw() | |||
401 | LLVector3 pos_local; | 406 | LLVector3 pos_local; |
402 | U32 compact_local; | 407 | U32 compact_local; |
403 | U8 bits; | 408 | U8 bits; |
409 | // TODO: it'd be very cool to draw these in sorted order from lowest Z to highest. | ||
410 | // just be careful to sort the avatar IDs along with the positions. -MG | ||
404 | for (i = 0; i < count; i++) | 411 | for (i = 0; i < count; i++) |
405 | { | 412 | { |
406 | compact_local = regionp->mMapAvatars.get(i); | 413 | compact_local = regionp->mMapAvatars.get(i); |
@@ -420,9 +427,16 @@ void LLNetMap::draw() | |||
420 | pos_global += origin_global; | 427 | pos_global += origin_global; |
421 | 428 | ||
422 | pos_map = globalPosToView(pos_global); | 429 | pos_map = globalPosToView(pos_global); |
423 | LLWorldMapView::drawAvatar(pos_map.mV[VX], pos_map.mV[VY], | 430 | |
424 | gAvatarMapColor, | 431 | BOOL show_as_friend = FALSE; |
425 | pos_map.mV[VZ]); | 432 | if( i < regionp->mMapAvatarIDs.count()) |
433 | { | ||
434 | show_as_friend = is_agent_friend(regionp->mMapAvatarIDs.get(i)); | ||
435 | } | ||
436 | LLWorldMapView::drawAvatar( | ||
437 | pos_map.mV[VX], pos_map.mV[VY], | ||
438 | show_as_friend ? gFriendMapColor : gAvatarMapColor, | ||
439 | pos_map.mV[VZ]); | ||
426 | } | 440 | } |
427 | } | 441 | } |
428 | 442 | ||