summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-07-23 02:04:00 +0000
committerTim Angus <tim@ngus.net>2005-07-23 02:04:00 +0000
commit48ec61d2ea43fb7e57e6cb24813e60ed0286537e (patch)
tree7bb1b55f3e902b242b3c118480dd0b445146b6e4 /src
parentca77c1bff3cf6f2847c11ebe5c99e1c634eb347f (diff)
* Lagometer now disabled on demo playback
* Lagometer rendering tweaked
Diffstat (limited to 'src')
-rw-r--r--src/cgame/cg_draw.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 88068c65..f5fb5487 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -2084,6 +2084,7 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y,
float v;
float ax, ay, aw, ah, mid, range;
int color;
+ vec4_t adjustedColor;
float vscale;
vec4_t white = { 1.0f, 1.0f, 1.0f, 1.0f };
@@ -2093,6 +2094,16 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y,
if( !cg_lagometer.integer )
return;
+ if( cg.demoPlayback )
+ return;
+
+ Vector4Copy( textColor, adjustedColor );
+ adjustedColor[ 3 ] = 0.25f;
+
+ trap_R_SetColor( adjustedColor );
+ CG_DrawPic( rect->x, rect->y, rect->w, rect->h, cgs.media.whiteShader );
+ trap_R_SetColor( NULL );
+
//
// draw the graph
//
@@ -2218,7 +2229,9 @@ static void CG_DrawLagometer( rectDef_t *rect, float text_x, float text_y,
ax = rect->x + ( rect->w / 2.0f ) - ( CG_Text_Width( s, scale, 0 ) / 2.0f ) + text_x;
ay = rect->y + ( rect->h / 2.0f ) + ( CG_Text_Height( s, scale, 0 ) / 2.0f ) + text_y;
- CG_Text_Paint( ax, ay, scale, textColor, s, 0, 0, ITEM_TEXTSTYLE_NORMAL );
+ Vector4Copy( textColor, adjustedColor );
+ adjustedColor[ 3 ] = 0.5f;
+ CG_Text_Paint( ax, ay, scale, adjustedColor, s, 0, 0, ITEM_TEXTSTYLE_NORMAL );
}
CG_DrawDisconnect( );