That status bar appears either blue or red in CTF matches, which is why it might be possible as a patch file.
More specifically, that bar is drawn by CG_DrawTeamBackground (in cgame/cg_draw.c, which compiles as part of /vm/cgame.qvm ). The function requires the player's team to be specifically TEAM_RED or TEAM_BLUE. In gametypes 0,1,2 the player is on TEAM_FREE or TEAM_SPECTATOR and cannot change to Blue or Red. (This is limited by the function SetTeam (in game/g_cmds.c, which compiles as part of /vm/qagame.qvm ). You cannot change to either Red or Blue team unless g_gametype >= 3.)
I don't have build tools on this machine, so I can't test this morning, but the following replacement function would set a grayscale bar when the player's team is not Red or Blue and the player is not a Spectator. Note that this is C, not Python, so LvL's killing of tabs doesn't matter.
void CG_DrawTeamBackground ( int x, int y, int w, int h, float alpha, int team )
{
vec4_t hcolor;
hcolor[3] = alpha;
if ( team == TEAM_FREE ) {
hcolor[0] = 0.5f;
hcolor[1] = 0.5f;
hcolor[2] = 0.5f;
} else if ( team == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
} else if ( team == TEAM_BLUE ) {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
} else {
return;
}
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
}
//end of CG_DrawTeamBackground
(Also: either thanks or apologies to Tig re: code formatting. :) )
Only registered members can post a reply.
Already registered? Sign in.