From e152761c284259d3a8a3728d60705f3aa3480f54 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sat, 2 Sep 2017 17:57:24 -0500 Subject: [PATCH] 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. --- code/cgame/cg_draw.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index 95666822..afe09412 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -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();