Some minor syntax grooming in LLNetMap::draw
This commit is contained in:
@@ -381,27 +381,29 @@ void LLNetMap::draw()
|
|||||||
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
|
LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
|
||||||
for(U32 i=0; i<avatar_ids.size(); i++)
|
for(U32 i=0; i<avatar_ids.size(); i++)
|
||||||
{
|
{
|
||||||
|
const LLUUID &id = avatar_ids[i];
|
||||||
|
const LLVector3d& pos = positions[i];
|
||||||
LLColor4 avColor = standard_color;
|
LLColor4 avColor = standard_color;
|
||||||
// TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
|
// 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
|
// just be careful to sort the avatar IDs along with the positions. -MG
|
||||||
pos_map = globalPosToView(positions[i], rotate_map);
|
pos_map = globalPosToView(pos, rotate_map);
|
||||||
if (positions[i].mdV[VZ] == 0.f)
|
if (pos.mdV[VZ] == 0.f)
|
||||||
{
|
{
|
||||||
pos_map.mV[VZ] = 16000.f;
|
pos_map.mV[VZ] = 16000.f;
|
||||||
}
|
}
|
||||||
std::string avName;
|
std::string avName;
|
||||||
|
|
||||||
gCacheName->getFullName(avatar_ids[i], avName);
|
gCacheName->getFullName(id, avName);
|
||||||
if(LLMuteList::getInstance()->isMuted(avatar_ids[i]))
|
if(LLMuteList::getInstance()->isMuted(id))
|
||||||
{
|
{
|
||||||
avColor = muted_color;
|
avColor = muted_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLViewerRegion* avatar_region = LLWorld::getInstance()->getRegionFromPosGlobal(positions[i]);
|
LLViewerRegion* avatar_region = LLWorld::getInstance()->getRegionFromPosGlobal(pos);
|
||||||
LLUUID estate_owner = avatar_region? avatar_region->getOwner() : LLUUID::null;
|
LLUUID estate_owner = avatar_region? avatar_region->getOwner() : LLUUID::null;
|
||||||
|
|
||||||
// MOYMOD Minimap custom av colors.
|
// MOYMOD Minimap custom av colors.
|
||||||
boost::unordered_map<const LLUUID,LLColor4>::const_iterator it = mm_MarkerColors.find(avatar_ids[i]);
|
boost::unordered_map<const LLUUID,LLColor4>::const_iterator it = mm_MarkerColors.find(id);
|
||||||
if(it != mm_MarkerColors.end())
|
if(it != mm_MarkerColors.end())
|
||||||
{
|
{
|
||||||
avColor = it->second;
|
avColor = it->second;
|
||||||
@@ -412,12 +414,12 @@ void LLNetMap::draw()
|
|||||||
avColor = linden_color;
|
avColor = linden_color;
|
||||||
}
|
}
|
||||||
//check if they are an estate owner at their current position
|
//check if they are an estate owner at their current position
|
||||||
else if(estate_owner.notNull() && avatar_ids[i] == estate_owner)
|
else if(estate_owner.notNull() && id == estate_owner)
|
||||||
{
|
{
|
||||||
avColor = em_color;
|
avColor = em_color;
|
||||||
}
|
}
|
||||||
//without these dots, SL would suck.
|
//without these dots, SL would suck.
|
||||||
else if(is_agent_friend(avatar_ids[i]))
|
else if(is_agent_friend(id))
|
||||||
{
|
{
|
||||||
avColor = friend_color;
|
avColor = friend_color;
|
||||||
}
|
}
|
||||||
@@ -432,8 +434,8 @@ void LLNetMap::draw()
|
|||||||
if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
|
if(dist_to_cursor < min_pick_dist && dist_to_cursor < closest_dist)
|
||||||
{
|
{
|
||||||
closest_dist = dist_to_cursor;
|
closest_dist = dist_to_cursor;
|
||||||
mClosestAgentToCursor = avatar_ids[i];
|
mClosestAgentToCursor = id;
|
||||||
mClosestAgentPosition = positions[i];
|
mClosestAgentPosition = pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user