FIRE-18207: Color avatar hitboxes in the same color as on minimap

Sat, 23 Apr 2016 22:41:58 +0200

author
Ansariel
date
Sat, 23 Apr 2016 22:41:58 +0200
changeset 48977
09948de7055a
parent 48976
ed2bf4d076b6
child 48978
283a2fb899b4

FIRE-18207: Color avatar hitboxes in the same color as on minimap

indra/newview/lldrawpoolavatar.cpp file | annotate | diff | revisions
indra/newview/llnetmap.cpp file | annotate | diff | revisions
indra/newview/llnetmap.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/lldrawpoolavatar.cpp	Sat Apr 23 14:29:41 2016 +0200
     1.2 +++ b/indra/newview/lldrawpoolavatar.cpp	Sat Apr 23 22:41:58 2016 +0200
     1.3 @@ -56,6 +56,7 @@
     1.4  // (See *NOTE: in renderAvatars why this forward declatation is commented out)
     1.5  // void drawBoxOutline(const LLVector3& pos,const LLVector3& size);	// llspatialpartition.cpp
     1.6  // </FS:Zi>
     1.7 +#include "llnetmap.h"
     1.8  
     1.9  static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
    1.10  static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
    1.11 @@ -1267,7 +1268,8 @@
    1.12  		gGL.matrixMode(LLRender::MM_MODELVIEW);
    1.13  		gGL.pushMatrix();
    1.14  
    1.15 -		gGL.diffuseColor4f(0.7f,1.0f,0.0f,0.3f);
    1.16 +		LLColor4 avatar_color = LLNetMap::getAvatarColor(avatarp->getID());
    1.17 +		gGL.diffuseColor4f(avatar_color.mV[VRED], avatar_color.mV[VGREEN], avatar_color.mV[VBLUE], avatar_color.mV[VALPHA]);
    1.18  		glLineWidth(2.0);
    1.19  
    1.20  		LLQuaternion rot=avatarp->getRotationRegion();
     2.1 --- a/indra/newview/llnetmap.cpp	Sat Apr 23 14:29:41 2016 +0200
     2.2 +++ b/indra/newview/llnetmap.cpp	Sat Apr 23 22:41:58 2016 +0200
     2.3 @@ -667,25 +667,7 @@
     2.4  			}
     2.5  			// </FS:Ansariel>	
     2.6  			
     2.7 -			LLColor4 color = map_avatar_color;	// <FS:CR>
     2.8 -			
     2.9 -			// <FS:CR> Color "special" avatars with special colors (Friends, muted, Lindens, etc)
    2.10 -			color = LGGContactSets::getInstance()->colorize(uuid, color, LGG_CS_MINIMAP);
    2.11 -			// </FS:CR>
    2.12 -			
    2.13 -			//color based on contact sets prefs
    2.14 -			if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(uuid, LGG_CS_MINIMAP))
    2.15 -			{
    2.16 -				color = LGGContactSets::getInstance()->getFriendColor(uuid);
    2.17 -			}
    2.18 -			
    2.19 -			// <FS:Ansariel> Mark Avatars with special colors
    2.20 -			avatar_marks_map_t::iterator found = sAvatarMarksMap.find(uuid);
    2.21 -			if (found != sAvatarMarksMap.end())
    2.22 -			{
    2.23 -				color = found->second;
    2.24 -			}
    2.25 -			// </FS:Ansariel> Mark Avatars with special colors
    2.26 +			LLColor4 color = getAvatarColor(uuid);	// <FS:CR>
    2.27  
    2.28  // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f | FS-Specific
    2.29  			LLWorldMapView::drawAvatar(
    2.30 @@ -1835,6 +1817,31 @@
    2.31  {
    2.32  	sAvatarMarksMap.clear();
    2.33  }
    2.34 +
    2.35 +// static
    2.36 +LLColor4 LLNetMap::getAvatarColor(const LLUUID& avatar_id)
    2.37 +{
    2.38 +	static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
    2.39 +	LLColor4 color = map_avatar_color;
    2.40 +			
    2.41 +	// Color "special" avatars with special colors (Friends, muted, Lindens, etc)
    2.42 +	color = LGGContactSets::getInstance()->colorize(avatar_id, color, LGG_CS_MINIMAP);
    2.43 +
    2.44 +	// Color based on contact sets prefs
    2.45 +	if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avatar_id, LGG_CS_MINIMAP))
    2.46 +	{
    2.47 +		color = LGGContactSets::getInstance()->getFriendColor(avatar_id);
    2.48 +	}
    2.49 +			
    2.50 +	// Mark Avatars with special colors
    2.51 +	avatar_marks_map_t::iterator found = sAvatarMarksMap.find(avatar_id);
    2.52 +	if (found != sAvatarMarksMap.end())
    2.53 +	{
    2.54 +		color = found->second;
    2.55 +	}
    2.56 +
    2.57 +	return color;
    2.58 +}
    2.59  //</FS:Ansariel>
    2.60  
    2.61  void LLNetMap::handleCam()
     3.1 --- a/indra/newview/llnetmap.h	Sat Apr 23 14:29:41 2016 +0200
     3.2 +++ b/indra/newview/llnetmap.h	Sat Apr 23 22:41:58 2016 +0200
     3.3 @@ -108,6 +108,7 @@
     3.4  	static void		clearAvatarMarkColor(const LLUUID& avatar_id);
     3.5  	static void		clearAvatarMarkColors(const uuid_vec_t& avatar_ids);
     3.6  	static void		clearAvatarMarkColors();
     3.7 +	static LLColor4	getAvatarColor(const LLUUID& avatar_id);
     3.8  	// </FS:Ansariel>
     3.9  
    3.10  private:

mercurial