diff options
Diffstat (limited to 'linden/indra/newview/llnetmap.cpp')
-rw-r--r-- | linden/indra/newview/llnetmap.cpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index f055dbc..5aaee1a 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -344,8 +344,9 @@ void LLNetMap::draw() | |||
344 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); | 344 | LLColor4 friend_color = gColors.getColor( "MapFriend" ); |
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 imp_dev_color = gColors.getColor( "MapImpDev" ); | ||
347 | LLColor4 glyph_color; | 348 | LLColor4 glyph_color; |
348 | F32 glyph_radius; | 349 | int selected = -1; |
349 | 350 | ||
350 | std::vector<LLUUID> avatar_ids; | 351 | std::vector<LLUUID> avatar_ids; |
351 | std::vector<LLVector3d> positions; | 352 | std::vector<LLVector3d> positions; |
@@ -356,19 +357,23 @@ void LLNetMap::draw() | |||
356 | // just be careful to sort the avatar IDs along with the positions. -MG | 357 | // just be careful to sort the avatar IDs along with the positions. -MG |
357 | pos_map = globalPosToView(positions[i], rotate_map); | 358 | pos_map = globalPosToView(positions[i], rotate_map); |
358 | 359 | ||
360 | // Save this entry to draw last | ||
359 | if (LLFloaterMap::getSelected() == avatar_ids[i]) | 361 | if (LLFloaterMap::getSelected() == avatar_ids[i]) |
360 | { | 362 | { |
361 | glyph_radius = mDotRadius * 1.7f; | 363 | selected = i; |
362 | glyph_color = selected_color; | 364 | continue; |
363 | } | 365 | } |
364 | else | 366 | else |
365 | { | 367 | { |
366 | glyph_radius = mDotRadius; | ||
367 | // Show them muted even if they're friends | 368 | // Show them muted even if they're friends |
368 | if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) | 369 | if (LLMuteList::getInstance()->isMuted(avatar_ids[i])) |
369 | { | 370 | { |
370 | glyph_color = muted_color; | 371 | glyph_color = muted_color; |
371 | } | 372 | } |
373 | else if (LLFloaterMap::isImpDev(avatar_ids[i])) | ||
374 | { | ||
375 | glyph_color = imp_dev_color; | ||
376 | } | ||
372 | else if (is_agent_friend(avatar_ids[i])) | 377 | else if (is_agent_friend(avatar_ids[i])) |
373 | { | 378 | { |
374 | glyph_color = friend_color; | 379 | glyph_color = friend_color; |
@@ -392,7 +397,7 @@ void LLNetMap::draw() | |||
392 | pos_map.mV[VX], pos_map.mV[VY], | 397 | pos_map.mV[VX], pos_map.mV[VY], |
393 | glyph_color, | 398 | glyph_color, |
394 | pos_map.mV[VZ], | 399 | pos_map.mV[VZ], |
395 | glyph_radius); | 400 | mDotRadius); |
396 | 401 | ||
397 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); | 402 | 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) | 403 | if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) |
@@ -402,6 +407,27 @@ void LLNetMap::draw() | |||
402 | } | 407 | } |
403 | } | 408 | } |
404 | 409 | ||
410 | // Draw dot for selected avatar last | ||
411 | if (selected >= 0 && avatar_ids[selected].notNull()) | ||
412 | { | ||
413 | pos_map = globalPosToView(positions[selected], rotate_map); | ||
414 | F32 glyph_radius = mDotRadius * 1.7f; | ||
415 | glyph_color = selected_color; | ||
416 | |||
417 | LLWorldMapView::drawAvatar( | ||
418 | pos_map.mV[VX], pos_map.mV[VY], | ||
419 | glyph_color, | ||
420 | pos_map.mV[VZ], | ||
421 | glyph_radius); | ||
422 | |||
423 | F32 dist_to_cursor = dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x,local_mouse_y)); | ||
424 | if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist) | ||
425 | { | ||
426 | closest_dist = dist_to_cursor; | ||
427 | mClosestAgentToCursor = avatar_ids[selected]; | ||
428 | } | ||
429 | } | ||
430 | |||
405 | // Draw dot for autopilot target | 431 | // Draw dot for autopilot target |
406 | if (gAgent.getAutoPilot()) | 432 | if (gAgent.getAutoPilot()) |
407 | { | 433 | { |