summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-05-29 21:50:23 +0000
committerTim Angus <tim@ngus.net>2004-05-29 21:50:23 +0000
commitb26e835db568d6d8bbf524ac2eaa415385911717 (patch)
treee9297301f9ba2fb0a8c4d0e841c9cd6ca247005c /src/cgame
parent2991a700937b44831092e8db2f01442d217876e5 (diff)
* Added code to report number of spawns remaining when spawning
* Tweaked some font values
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_draw.c20
-rw-r--r--src/cgame/cg_local.h3
-rw-r--r--src/cgame/cg_main.c4
-rw-r--r--src/cgame/cg_servercmds.c3
4 files changed, 28 insertions, 2 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 6ca952e0..266d03e9 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2911,6 +2911,26 @@ static qboolean CG_DrawQueue( void )
cg.snap->ps.persistant[ PERS_QUEUEPOS ] + 1 );
w = CG_Text_Width( buffer, 0.7f, 0 );
+ CG_Text_Paint( 320 - w / 2, 360, 0.7f, color, buffer, 0, 0, ITEM_TEXTSTYLE_SHADOWED );
+
+ if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_ALIENS )
+ {
+ if( cgs.numAlienSpawns == 1 )
+ Com_sprintf( buffer, MAX_STRING_CHARS, "There is 1 spawn remaining." );
+ else
+ Com_sprintf( buffer, MAX_STRING_CHARS, "There are %d spawns remaining.",
+ cgs.numAlienSpawns );
+ }
+ else if( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS )
+ {
+ if( cgs.numHumanSpawns == 1 )
+ Com_sprintf( buffer, MAX_STRING_CHARS, "There is 1 spawn remaining." );
+ else
+ Com_sprintf( buffer, MAX_STRING_CHARS, "There are %d spawns remaining.",
+ cgs.numHumanSpawns );
+ }
+
+ w = CG_Text_Width( buffer, 0.7f, 0 );
CG_Text_Paint( 320 - w / 2, 400, 0.7f, color, buffer, 0, 0, ITEM_TEXTSTYLE_SHADOWED );
return qtrue;
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index e637742e..36d859fb 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1276,6 +1276,9 @@ typedef struct
int alienStage;
int humanStage;
+
+ int numAlienSpawns;
+ int numHumanSpawns;
//
// locally derived information from gamestate
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 8dea2aed..4995cde0 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -338,8 +338,8 @@ static cvarTable_t cvarTable[ ] =
{ &pmove_msec, "pmove_msec", "8", 0},
{ &cg_noTaunt, "cg_noTaunt", "0", CVAR_ARCHIVE},
{ &cg_noProjectileTrail, "cg_noProjectileTrail", "0", CVAR_ARCHIVE},
- { &cg_smallFont, "ui_smallFont", "0.25", CVAR_ARCHIVE},
- { &cg_bigFont, "ui_bigFont", "0.4", CVAR_ARCHIVE},
+ { &cg_smallFont, "ui_smallFont", "0.2", CVAR_ARCHIVE},
+ { &cg_bigFont, "ui_bigFont", "0.5", CVAR_ARCHIVE},
{ &cg_oldRail, "cg_oldRail", "1", CVAR_ARCHIVE},
{ &cg_oldRocket, "cg_oldRocket", "1", CVAR_ARCHIVE},
{ &cg_oldPlasma, "cg_oldPlasma", "1", CVAR_ARCHIVE},
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 3083e37b..a8844206 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -154,6 +154,7 @@ void CG_SetConfigValues( void )
&cgs.humanBuildPointsPowered );
sscanf( CG_ConfigString( CS_STAGES ), "%d %d", &cgs.alienStage, &cgs.humanStage );
+ sscanf( CG_ConfigString( CS_SPAWNS ), "%d %d", &cgs.numAlienSpawns, &cgs.numHumanSpawns );
cgs.levelStartTime = atoi( CG_ConfigString( CS_LEVEL_START_TIME ) );
cg.warmup = atoi( CG_ConfigString( CS_WARMUP ) );
@@ -288,6 +289,8 @@ static void CG_ConfigStringModified( void )
if( cgs.humanStage != oldHumanStage )
CG_AnnounceHumanStageTransistion( oldHumanStage, cgs.humanStage );
}
+ else if( num == CS_SPAWNS )
+ sscanf( str, "%d %d", &cgs.numAlienSpawns, &cgs.numHumanSpawns );
else if( num == CS_LEVEL_START_TIME )
cgs.levelStartTime = atoi( str );
else if( num == CS_VOTE_TIME )