Fix team chat box for spectators

Make spectators use green background for team chat box when following
players. The team chat messages are from spectators not the team of
the followed player.

Make spectators draw team chat box even when not following a player.
This commit is contained in:
Zack Middleton 2017-09-02 17:57:24 -05:00
parent 5d88c6fdee
commit e152761c28

View file

@ -1374,12 +1374,12 @@ static void CG_DrawTeamInfo( void ) {
h = (cgs.teamChatPos - cgs.teamLastChatPos) * TINYCHAR_HEIGHT;
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
if ( cgs.clientinfo[cg.clientNum].team == TEAM_RED ) {
hcolor[0] = 1.0f;
hcolor[1] = 0.0f;
hcolor[2] = 0.0f;
hcolor[3] = 0.33f;
} else if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
} else if ( cgs.clientinfo[cg.clientNum].team == TEAM_BLUE ) {
hcolor[0] = 0.0f;
hcolor[1] = 0.0f;
hcolor[2] = 1.0f;
@ -2582,12 +2582,12 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
#endif
CG_DrawReward();
}
}
if ( cgs.gametype >= GT_TEAM ) {
if ( cgs.gametype >= GT_TEAM ) {
#ifndef MISSIONPACK
CG_DrawTeamInfo();
CG_DrawTeamInfo();
#endif
}
}
CG_DrawVote();