summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorenneract <trem.redman@gmail.com>2014-12-06 23:34:48 +0100
committerenneract <trem.redman@gmail.com>2014-12-06 23:34:48 +0100
commit58903527dbf5fc7d8035ac2349174fe5f58ba2ac (patch)
tree34548ca5936b4157b9e608f71f6e83459de9d66a /src/cgame
parentfd19ccb037e349286e3b72a1277c58079056fcc2 (diff)
Add total BP counters to HUD.
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_draw.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 6af1375..46f81d2 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -1789,6 +1789,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
==================
*/
@@ -3148,6 +3168,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;