summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c26
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_main.c5
3 files changed, 32 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 11bc242..11ac93c 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -1784,6 +1784,26 @@ static void CG_DrawStageReport( rectDef_t *rect, float text_x, float text_y,
/*
==================
+CG_DrawBuildPoolReport
+==================
+*/
+static void CG_DrawBuildPoolReport( rectDef_t *rect, float text_x, float text_y,
+ vec4_t color, float scale, int textalign, int textvalign, int textStyle, qboolean humans )
+{
+ char out[ 20 ];
+ float tx, ty;
+
+ if( cg.intermissionStarted )
+ return;
+
+ Com_sprintf( out, sizeof( out ), "%s", Info_ValueForKey( CG_ConfigString( CS_BUILD_POOLS ), ( humans ? "h" : "a" ) ) );
+
+ CG_AlignText( rect, out, scale, 0.0f, 0.0f, textalign, textvalign, &tx, &ty );
+ UI_Text_Paint( text_x + tx, text_y + ty, scale, color, out, 0, 0, textStyle );
+}
+
+/*
+==================
CG_DrawFPS
==================
*/
@@ -3143,6 +3163,12 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x,
case CG_STAGE_REPORT_TEXT:
CG_DrawStageReport( &rect, text_x, text_y, foreColor, scale, textalign, textvalign, textStyle );
break;
+ case CG_ALIEN_BUILD_POOL:
+ CG_DrawBuildPoolReport( &rect, text_x, text_y, foreColor, scale, textalign, textvalign, textStyle, qfalse );
+ break;
+ case CG_HUMAN_BUILD_POOL:
+ CG_DrawBuildPoolReport( &rect, text_x, text_y, foreColor, scale, textalign, textvalign, textStyle, qtrue );
+ break;
case CG_ALIENS_SCORE_LABEL:
CG_DrawTeamLabel( &rect, TEAM_ALIENS, text_x, text_y, foreColor, scale, textalign, textvalign, textStyle );
break;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 2ca9e32..9edd57b 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -77,6 +77,7 @@ enum
CS_CLIENTS_READY,
CS_ALIEN_STAGES,
CS_HUMAN_STAGES,
+ CS_BUILD_POOLS,
CS_MODELS,
CS_SOUNDS = CS_MODELS + MAX_MODELS,
CS_SHADERS = CS_SOUNDS + MAX_SOUNDS,
diff --git a/src/game/g_main.c b/src/game/g_main.c
index 10df6c0..f41d8d3 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -1404,6 +1404,11 @@ void G_CalculateBuildPoints( void )
level.humanBuildPoints += level.humanExtraBuildPoints;
level.alienBuildPoints += level.alienExtraBuildPoints;
}
+
+ trap_SetConfigstring( CS_BUILD_POOLS, va( "a\\%d\\h\\%d",
+ g_alienBuildPoints.integer + level.alienExtraBuildPoints,
+ g_humanBuildPoints.integer + level.humanExtraBuildPoints ) );
+
//zero bp not allowed
// if( level.humanBuildPoints < 0 )
// level.humanBuildPoints = 0;