Today i tried to make some order in my mods, but i get a silly respond from my build.
here are some questions:
1. There's a max length limit (in number of words) for my cg_ex_newstatusbar for example) shaders?
catch here where i did wrong because
the compiled one seems don't recognize the shader and don't apply alpha:
on cg_draw
Code: Select all
/*
================
CG_DrawTeamBackground
================
*/
void CG_DrawTeamBackground( int x, int y, int w, int h, float alpha, int team )
{
vec4_t hcolor;
hcolor[3] = alpha;
if (cg_modernHUD.integer <= 0) {
if ( team == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
}
else if ( team == TEAM_BLUE ) {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
}
else if ( team == TEAM_FREE ) {
hcolor[0] = 1;
hcolor[1] = 1;
hcolor[2] = 1;
hcolor[3] = 0.1;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.OldStatusBar );
trap_R_SetColor( NULL );
}
if (cg_modernHUD.integer >= 1) {
if ( team == TEAM_RED ) {
hcolor[0] = 0.9;
hcolor[1] = 0.8;
hcolor[2] = 0.8;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.NewStatusBar );
trap_R_SetColor( NULL );
}
else if ( team == TEAM_BLUE ) {
hcolor[0] = 0.8;
hcolor[1] = 0.8;
hcolor[2] = 0.9;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.NewStatusBar );
trap_R_SetColor( NULL );
}
else if ( team == TEAM_FREE ) {
hcolor[0] = 1;
hcolor[1] = 1;
hcolor[2] = 1;
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.NewStatusBar );
trap_R_SetColor( NULL );
}
}
}
}
Code: Select all
qhandle_t NewStatusBar;
qhandle_t OldStatusBar;
Code: Select all
cgs.media.NewStatusBar = trap_R_RegisterShaderNoMip( "Ex/NewStatusBar.tga" );
cgs.media.OldStatusBar = trap_R_RegisterShaderNoMip( "Ex/OldStatusBar.tga" );
Code: Select all
Ex/Ex_OldStatusBar
{
nopicmip
{
map Ex/OldStatusBar.tga
blendfunc blend
}
}
Ex/Ex_NewStatusBar
{
nopicmip
{
map Ex/NewStatusBar.tga
blendfunc blend
}
}
PURPOSE:
i added a shader for FFA modality in standard quake 3: client will see an little -alpha black bar when they play ffa or other gametypes withouts team
WHAT I SEE:
total black bar
PURPOSE:
when cg_modernHUD equals to 1 or more i will see a different shader for my statusbar, different positions etc...
WHAT I SEE:
nothing...like if the team variable is empty and the game doesn't draw anything...
can see all but my statusbar shader doesn't happear