mirror of
https://github.com/Q3Rally-Team/q3rally.git
synced 2024-11-24 21:01:34 +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 );
|
s = va( "%ifps", fps );
|
||||||
w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH;
|
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;
|
return y + BIGCHAR_HEIGHT + 4;
|
||||||
|
@ -1642,8 +1642,8 @@ float CG_DrawScores( float x, float y ) {
|
||||||
|
|
||||||
CG_FillRect( x - 80, y, 96, 18, bgColor );
|
CG_FillRect( x - 80, y, 96, 18, bgColor );
|
||||||
|
|
||||||
if (cgs.gametype >= GT_TEAM){
|
|
||||||
// draw yellow
|
// draw yellow
|
||||||
|
|
||||||
color[0] = 1.0f;
|
color[0] = 1.0f;
|
||||||
color[1] = 1.0f;
|
color[1] = 1.0f;
|
||||||
color[2] = 0.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);
|
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
|
// draw green
|
||||||
|
|
||||||
color[0] = 0.0f;
|
color[0] = 0.0f;
|
||||||
color[1] = 1.0f;
|
color[1] = 1.0f;
|
||||||
color[2] = 0.0f;
|
color[2] = 0.0f;
|
||||||
|
@ -1670,7 +1686,23 @@ float CG_DrawScores( float x, float y ) {
|
||||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||||
}
|
}
|
||||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||||
|
|
||||||
|
if ( cgs.gametype == GT_CTF ) {
|
||||||
|
// Display green flag status
|
||||||
|
item = BG_FindItemForPowerup( PW_GREENFLAG );
|
||||||
|
|
||||||
|
if (item) {
|
||||||
|
|
||||||
|
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[0] = 0.0f;
|
||||||
color[1] = 0.0f;
|
color[1] = 0.0f;
|
||||||
|
@ -1679,17 +1711,14 @@ float CG_DrawScores( float x, float y ) {
|
||||||
s = va( "%2i", s2 );
|
s = va( "%2i", s2 );
|
||||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||||
x -= w;
|
x -= w;
|
||||||
|
|
||||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
|
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
|
||||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||||
|
|
||||||
if ( cgs.gametype == GT_CTF ) {
|
if ( cgs.gametype == GT_CTF ) {
|
||||||
// Display flag status
|
// Display blue flag status
|
||||||
item = BG_FindItemForPowerup( PW_BLUEFLAG );
|
item = BG_FindItemForPowerup( PW_BLUEFLAG );
|
||||||
|
|
||||||
if (item) {
|
if (item) {
|
||||||
|
@ -1703,6 +1732,8 @@ float CG_DrawScores( float x, float y ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// draw red
|
||||||
|
|
||||||
color[0] = 1.0f;
|
color[0] = 1.0f;
|
||||||
color[1] = 0.0f;
|
color[1] = 0.0f;
|
||||||
color[2] = 0.0f;
|
color[2] = 0.0f;
|
||||||
|
@ -1710,31 +1741,29 @@ float CG_DrawScores( float x, float y ) {
|
||||||
s = va( "%2i", s1 );
|
s = va( "%2i", s1 );
|
||||||
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
w = CG_DrawStrlen( s ) * TINYCHAR_WIDTH + 8;
|
||||||
x -= w;
|
x -= w;
|
||||||
|
|
||||||
CG_FillRect( x+1, y+1, w-2, 16, color );
|
CG_FillRect( x+1, y+1, w-2, 16, color );
|
||||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
|
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
|
||||||
|
|
||||||
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
CG_DrawPic( x+1, y+1, w-2, 16, cgs.media.selectShader );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
CG_DrawTinyDigitalString( x + 4, y+4, s, 1.0F);
|
||||||
|
|
||||||
if ( cgs.gametype == GT_CTF ) {
|
if ( cgs.gametype == GT_CTF ) {
|
||||||
// Display flag status
|
// Display red flag status
|
||||||
item = BG_FindItemForPowerup( PW_REDFLAG );
|
item = BG_FindItemForPowerup( PW_REDFLAG );
|
||||||
|
|
||||||
if (item) {
|
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
|
#ifdef MISSIONPACK
|
||||||
if ( cgs.gametype == GT_1FCTF ) {
|
if ( cgs.gametype == GT_1FCTF ) {
|
||||||
// Display flag status
|
// Display flag status
|
||||||
|
|
|
@ -1244,7 +1244,7 @@ typedef struct {
|
||||||
// Q3Rally Code Start
|
// Q3Rally Code Start
|
||||||
int scores3, scores4; // from configstrings
|
int scores3, scores4; // from configstrings
|
||||||
// Q3Rally Code END
|
// Q3Rally Code END
|
||||||
int redflag, blueflag; // flag status from configstrings
|
int redflag, blueflag, greenflag, yellowflag; // flag status from configstrings
|
||||||
int flagStatus;
|
int flagStatus;
|
||||||
int sigil[MAX_SIGILS];
|
int sigil[MAX_SIGILS];
|
||||||
qboolean newHud;
|
qboolean newHud;
|
||||||
|
|
|
@ -2203,7 +2203,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) {
|
||||||
|
|
||||||
cg.weaponSelect = WP_MACHINEGUN;
|
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;
|
cgs.flagStatus = -1;
|
||||||
// Q3Rally Code Start
|
// Q3Rally Code Start
|
||||||
for ( i = 0; i < MAX_SIGILS; i++ ) {
|
for ( i = 0; i < MAX_SIGILS; i++ ) {
|
||||||
|
|
|
@ -284,6 +284,8 @@ void CG_SetConfigValues( void ) {
|
||||||
s = CG_ConfigString( CS_FLAGSTATUS );
|
s = CG_ConfigString( CS_FLAGSTATUS );
|
||||||
cgs.redflag = s[0] - '0';
|
cgs.redflag = s[0] - '0';
|
||||||
cgs.blueflag = s[1] - '0';
|
cgs.blueflag = s[1] - '0';
|
||||||
|
cgs.greenflag = s[2] - '0';
|
||||||
|
cgs.yellowflag = s[3] - '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ( cgs.gametype == GT_DOMINATION ) {
|
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"
|
#define BASETA "missionpack"
|
||||||
|
|
||||||
#ifndef PRODUCT_VERSION
|
#ifndef PRODUCT_VERSION
|
||||||
#define PRODUCT_VERSION "v0.5 r606"
|
#define PRODUCT_VERSION "v0.5 r607"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
q3rallycode.ppr
BIN
q3rallycode.ppr
Binary file not shown.
Loading…
Reference in a new issue