mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-21 11:31:21 +00:00
some more changes for 4TCTF
This commit is contained in:
parent
c9856b0dce
commit
010c144fc0
6 changed files with 89 additions and 58 deletions
|
@ -1359,7 +1359,7 @@ static float CG_DrawFPS( float y ) {
|
|||
s = va( "%ifps", fps );
|
||||
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
|
||||
|
||||
CG_DrawBigString( 635 - w, y + 2, s, 1.0F);
|
||||
CG_DrawBigString( 622 - w, 355 + 2, s, 1.0F);
|
||||
}
|
||||
|
||||
return y + BIGCHAR_HEIGHT + 4;
|
||||
|
@ -1641,9 +1641,9 @@ float CG_DrawScores( float x, float y ) {
|
|||
if ( cgs.gametype >= GT_TEAM ) {
|
||||
|
||||
CG_FillRect( x - 80, y, 96, 18, bgColor );
|
||||
|
||||
if (cgs.gametype >= GT_TEAM){
|
||||
// draw yellow
|
||||
|
||||
// draw yellow
|
||||
|
||||
color[0] = 1.0f;
|
||||
color[1] = 1.0f;
|
||||
color[2] = 0.0f;
|
||||
|
@ -1657,7 +1657,23 @@ float CG_DrawScores( float x, float y ) {
|
|||
}
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display yellow flag status
|
||||
item = BG_FindItemForPowerup( PW_YELLOWFLAG );
|
||||
|
||||
if (item) {
|
||||
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
if( cgs.yellowflag >= 0 && cgs.yellowflag <= 2 ) {
|
||||
|
||||
CG_DrawPic( x+1, y1+1, w-2, 16, cgs.media.yellowFlagShader[cgs.yellowflag] );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// draw green
|
||||
|
||||
color[0] = 0.0f;
|
||||
color[1] = 1.0f;
|
||||
color[2] = 0.0f;
|
||||
|
@ -1670,71 +1686,84 @@ float CG_DrawScores( float x, float y ) {
|
|||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||
}
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
}
|
||||
|
||||
color[0] = 0.0f;
|
||||
color[1] = 0.0f;
|
||||
color[2] = 1.0f;
|
||||
color[3] = 0.33f;
|
||||
s = va( "%2i", s2 );
|
||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||
x -= w;
|
||||
|
||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
|
||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||
|
||||
}
|
||||
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display flag status
|
||||
item = BG_FindItemForPowerup( PW_BLUEFLAG );
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display green flag status
|
||||
item = BG_FindItemForPowerup( PW_GREENFLAG );
|
||||
|
||||
if (item) {
|
||||
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
if( cgs.blueflag >= 0 && cgs.blueflag <= 2 ) {
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
if( cgs.greenflag >= 0 && cgs.greenflag <= 2 ) {
|
||||
|
||||
CG_DrawPic( x+1, y1+1, w-2, 16, cgs.media.greenFlagShader[cgs.greenflag] );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// draw blue
|
||||
|
||||
color[0] = 0.0f;
|
||||
color[1] = 0.0f;
|
||||
color[2] = 1.0f;
|
||||
color[3] = 0.33f;
|
||||
s = va( "%2i", s2 );
|
||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||
x -= w;
|
||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
|
||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||
}
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display blue flag status
|
||||
item = BG_FindItemForPowerup( PW_BLUEFLAG );
|
||||
|
||||
if (item) {
|
||||
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
if( cgs.blueflag >= 0 && cgs.blueflag <= 2 ) {
|
||||
|
||||
CG_DrawPic( x+1, y1+1, w-2, 16, cgs.media.blueFlagShader[cgs.blueflag] );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// draw red
|
||||
|
||||
color[0] = 1.0f;
|
||||
color[1] = 0.0f;
|
||||
color[2] = 0.0f;
|
||||
color[3] = 0.33f;
|
||||
s = va( "%2i", s1 );
|
||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||
x -= w;
|
||||
color[0] = 1.0f;
|
||||
color[1] = 0.0f;
|
||||
color[2] = 0.0f;
|
||||
color[3] = 0.33f;
|
||||
s = va( "%2i", s1 );
|
||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||
x -= w;
|
||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
|
||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||
}
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
|
||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
|
||||
|
||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||
|
||||
}
|
||||
|
||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display flag status
|
||||
item = BG_FindItemForPowerup( PW_REDFLAG );
|
||||
if ( cgs.gametype == GT_CTF ) {
|
||||
// Display red flag status
|
||||
item = BG_FindItemForPowerup( PW_REDFLAG );
|
||||
|
||||
if (item) {
|
||||
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
y1 = y + TINYCHAR_HEIGHT + 8;
|
||||
if( cgs.redflag >= 0 && cgs.redflag <= 2 ) {
|
||||
|
||||
if( cgs.redflag >= 0 && cgs.redflag <= 2 ) {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
CG_DrawPic( x+1, y1+1, w-2, 16, cgs.media.redFlagShader[cgs.redflag] );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef MISSIONPACK
|
||||
if ( cgs.gametype == GT_1FCTF ) {
|
||||
// Display flag status
|
||||
|
|
|
@ -1244,7 +1244,7 @@ typedef struct {
|
|||
// Q3Rally Code Start
|
||||
int scores3, scores4; // from configstrings
|
||||
// Q3Rally Code END
|
||||
int redflag, blueflag; // flag status from configstrings
|
||||
int redflag, blueflag, greenflag, yellowflag; // flag status from configstrings
|
||||
int flagStatus;
|
||||
int sigil[MAX_SIGILS];
|
||||
qboolean newHud;
|
||||
|
|
|
@ -2203,7 +2203,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
|||
|
||||
cg.weaponSelect = WP_MACHINEGUN;
|
||||
|
||||
cgs.redflag = cgs.blueflag = -1; // For compatibily, default to unset for
|
||||
cgs.redflag = cgs.blueflag = cgs.greenflag = cgs.yellowflag = -1; // For compatibily, default to unset for
|
||||
cgs.flagStatus = -1;
|
||||
// Q3Rally Code Start
|
||||
for ( i = 0; i < MAX_SIGILS; i++ ) {
|
||||
|
|
|
@ -284,6 +284,8 @@ void CG_SetConfigValues( void ) {
|
|||
s = CG_ConfigString( CS_FLAGSTATUS );
|
||||
cgs.redflag = s[0] - '0';
|
||||
cgs.blueflag = s[1] - '0';
|
||||
cgs.greenflag = s[2] - '0';
|
||||
cgs.yellowflag = s[3] - '0';
|
||||
}
|
||||
|
||||
else if ( cgs.gametype == GT_DOMINATION ) {
|
||||
|
|
|
@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#define PRODUCT_VERSION "v0.5 r606"
|
||||
#define PRODUCT_VERSION "v0.5 r607"
|
||||
#endif
|
||||
|
||||
|
||||
|
|
BIN
q3rallycode.ppr
BIN
q3rallycode.ppr
Binary file not shown.
Loading…
Reference in a new issue