diff options
author | McCabe Maxsted | 2009-06-13 07:05:13 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-06-13 07:05:13 -0700 |
commit | 3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e (patch) | |
tree | e3ca6544a945cbc3b8b66f2a44af039cd15820d2 /linden/indra/newview/llnetmap.cpp | |
parent | Forgot tooltip for map opening, fixed typo (diff) | |
download | meta-impy-3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e.zip meta-impy-3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e.tar.gz meta-impy-3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e.tar.bz2 meta-impy-3e47e61a5d88cdaadc34bc6ad4787c0a9d405b2e.tar.xz |
Show muted avatars as grey in the mini-map
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llnetmap.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 999a2fe..35982c8 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "llfloateravatarinfo.h" | 47 | #include "llfloateravatarinfo.h" |
48 | #include "llfloaterworldmap.h" | 48 | #include "llfloaterworldmap.h" |
49 | #include "llframetimer.h" | 49 | #include "llframetimer.h" |
50 | #include "llmutelist.h" | ||
50 | #include "lltracker.h" | 51 | #include "lltracker.h" |
51 | #include "llmenugl.h" | 52 | #include "llmenugl.h" |
52 | #include "llsurface.h" | 53 | #include "llsurface.h" |
@@ -327,6 +328,9 @@ void LLNetMap::draw() | |||
327 | // Draw avatars | 328 | // Draw avatars |
328 | LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); | 329 | LLColor4 avatar_color = gColors.getColor( "MapAvatar" ); |
329 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); | 330 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); |
331 | LLColor4 muted_color = gColors.getColor( "MapMuted" ); | ||
332 | LLColor4 glyph_color; | ||
333 | |||
330 | std::vector<LLUUID> avatar_ids; | 334 | std::vector<LLUUID> avatar_ids; |
331 | std::vector<LLVector3d> positions; | 335 | std::vector<LLVector3d> positions; |
332 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); | 336 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); |
@@ -336,9 +340,23 @@ void LLNetMap::draw() | |||
336 | // just be careful to sort the avatar IDs along with the positions. -MG | 340 | // just be careful to sort the avatar IDs along with the positions. -MG |
337 | pos_map = globalPosToView(positions[i], rotate_map); | 341 | pos_map = globalPosToView(positions[i], rotate_map); |
338 | 342 | ||
343 | // Show them muted even if they're friends | ||
344 | if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) | ||
345 | { | ||
346 | glyph_color = muted_color; | ||
347 | } | ||
348 | else if (is_agent_friend(avatar_ids[i])) | ||
349 | { | ||
350 | glyph_color = friend_color; | ||
351 | } | ||
352 | else | ||
353 | { | ||
354 | glyph_color = avatar_color; | ||
355 | } | ||
356 | |||
339 | LLWorldMapView::drawAvatar( | 357 | LLWorldMapView::drawAvatar( |
340 | pos_map.mV[VX], pos_map.mV[VY], | 358 | pos_map.mV[VX], pos_map.mV[VY], |
341 | is_agent_friend(avatar_ids[i]) ? friend_color : avatar_color, | 359 | glyph_color, |
342 | pos_map.mV[VZ]); | 360 | pos_map.mV[VZ]); |
343 | 361 | ||
344 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); | 362 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); |