Scoreboard coloring
This commit is contained in:
parent
c12b295b96
commit
fe97e1695a
@ -77,11 +77,11 @@ int CHudMOTD :: Draw( float fTime )
|
||||
int ypos_r=ypos;
|
||||
if( height > ROW_RANGE_MAX )
|
||||
{
|
||||
ypos = ROW_RANGE_MIN + 3 + scroll;
|
||||
if( ypos > ROW_RANGE_MIN )
|
||||
scroll-=7;
|
||||
ypos = ROW_RANGE_MIN + 7 + scroll;
|
||||
if( ypos > ROW_RANGE_MIN + 4 )
|
||||
scroll-= (ypos - ( ROW_RANGE_MIN + 4))/3.0;
|
||||
if( ypos + height < ROW_RANGE_MAX )
|
||||
scroll+=7;
|
||||
scroll+= (ROW_RANGE_MAX - (ypos + height))/ 3.0;
|
||||
ypos_r = ROW_RANGE_MIN;
|
||||
height = ROW_RANGE_MAX;
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ int CHudScoreboard :: Draw( float fTime )
|
||||
|
||||
if ( !m_iShowscoresHeld && gHUD.m_Health.m_iHealth > 0 && !gHUD.m_iIntermission )
|
||||
return 1;
|
||||
|
||||
gHUD.m_iNoConsolePrint |= 1 << 0;
|
||||
|
||||
GetAllPlayersInfo();
|
||||
@ -318,7 +319,7 @@ int CHudScoreboard :: Draw( float fTime )
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern float *GetClientColor( int client );
|
||||
// returns the ypos where it finishes drawing
|
||||
int CHudScoreboard :: DrawPlayers( int xpos_rel, float list_slot, int nameoffset, char *team )
|
||||
{
|
||||
@ -377,6 +378,8 @@ int CHudScoreboard :: DrawPlayers( int xpos_rel, float list_slot, int nameoffset
|
||||
|
||||
int xpos = NAME_RANGE_MIN + xpos_rel;
|
||||
int r = 255, g = 255, b = 255;
|
||||
float *colors = GetClientColor( best_player );
|
||||
r *= colors[0], g *= colors[1], b *= colors[2];
|
||||
if ( best_player == m_iLastKilledBy && m_fLastKillTime && m_fLastKillTime > gHUD.m_flTime )
|
||||
{
|
||||
if ( pl_info->thisplayer )
|
||||
|
Loading…
x
Reference in New Issue
Block a user