aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llnetmap.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-02 02:36:21 -0700
committerMcCabe Maxsted2009-10-02 02:36:21 -0700
commitaa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f (patch)
tree2d28e3d3906b7e7623c7880cdba4e1ce559c7acc /linden/indra/newview/llnetmap.cpp
parentFixed switched Buy and Create locations in object pie menu (regression) (diff)
downloadmeta-impy-aa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f.zip
meta-impy-aa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f.tar.gz
meta-impy-aa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f.tar.bz2
meta-impy-aa1fc0d6e16a0c89f276f5c1b7ef2de10fc5800f.tar.xz
Draw selected avatars last (and fixed silver skin missing selection color)
Diffstat (limited to 'linden/indra/newview/llnetmap.cpp')
-rw-r--r--linden/indra/newview/llnetmap.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp
index f055dbc..dc4a4ae 100644
--- a/linden/indra/newview/llnetmap.cpp
+++ b/linden/indra/newview/llnetmap.cpp
@@ -345,7 +345,7 @@ void LLNetMap::draw()
345 LLColor4 muted_color = gColors.getColor( "MapMuted" ); 345 LLColor4 muted_color = gColors.getColor( "MapMuted" );
346 LLColor4 selected_color = gColors.getColor( "MapSelected" ); 346 LLColor4 selected_color = gColors.getColor( "MapSelected" );
347 LLColor4 glyph_color; 347 LLColor4 glyph_color;
348 F32 glyph_radius; 348 int selected = -1;
349 349
350 std::vector<LLUUID> avatar_ids; 350 std::vector<LLUUID> avatar_ids;
351 std::vector<LLVector3d> positions; 351 std::vector<LLVector3d> positions;
@@ -356,14 +356,14 @@ void LLNetMap::draw()
356 // just be careful to sort the avatar IDs along with the positions. -MG 356 // just be careful to sort the avatar IDs along with the positions. -MG
357 pos_map = globalPosToView(positions[i], rotate_map); 357 pos_map = globalPosToView(positions[i], rotate_map);
358 358
359 // Save this entry to draw last
359 if (LLFloaterMap::getSelected() == avatar_ids[i]) 360 if (LLFloaterMap::getSelected() == avatar_ids[i])
360 { 361 {
361 glyph_radius = mDotRadius * 1.7f; 362 selected = i;
362 glyph_color = selected_color; 363 continue;
363 } 364 }
364 else 365 else
365 { 366 {
366 glyph_radius = mDotRadius;
367 // Show them muted even if they're friends 367 // Show them muted even if they're friends
368 if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) 368 if (LLMuteList::getInstance()->isMuted(avatar_ids[i]))
369 { 369 {
@@ -392,7 +392,7 @@ void LLNetMap::draw()
392 pos_map.mV[VX], pos_map.mV[VY], 392 pos_map.mV[VX], pos_map.mV[VY],
393 glyph_color, 393 glyph_color,
394 pos_map.mV[VZ], 394 pos_map.mV[VZ],
395 glyph_radius); 395 mDotRadius);
396 396
397 F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); 397 F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y));
398 if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) 398 if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
@@ -402,6 +402,27 @@ void LLNetMap::draw()
402 } 402 }
403 } 403 }
404 404
405 // Draw dot for selected avatar last
406 if (selected >= 0)
407 {
408 pos_map = globalPosToView(positions[selected], rotate_map);
409 F32 glyph_radius = mDotRadius * 1.7f;
410 glyph_color = selected_color;
411
412 LLWorldMapView::drawAvatar(
413 pos_map.mV[VX], pos_map.mV[VY],
414 glyph_color,
415 pos_map.mV[VZ],
416 glyph_radius);
417
418 F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y));
419 if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
420 {
421 closest_dist = dist_to_cursor;
422 mClosestAgentToCursor = avatar_ids[selected];
423 }
424 }
425
405 // Draw dot for autopilot target 426 // Draw dot for autopilot target
406 if (gAgent.getAutoPilot()) 427 if (gAgent.getAutoPilot())
407 { 428 {