summaryrefslogtreecommitdiff
path: root/src/cgame/cg_draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r--src/cgame/cg_draw.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 2cb4e305..f77e44a3 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -3156,6 +3156,41 @@ static qboolean CG_DrawQueue( void )
return qtrue;
}
+
+/*
+=================
+CG_DrawWarmup
+=================
+*/
+static void CG_DrawWarmup( void )
+{
+ int sec = 0;
+ int w;
+ int h;
+ float size = 0.5f;
+ char text[ MAX_STRING_CHARS ] = S_COLOR_RED "Warmup Time:";
+
+ if( !cg.warmupTime )
+ return;
+
+ sec = ( cg.warmupTime - cg.time ) / 1000;
+
+ if( sec < 0 )
+ return;
+
+
+ w = UI_Text_Width( text, size, 0 );
+ h = UI_Text_Height( text, size, 0 );
+ UI_Text_Paint( 320 - w / 2, 200, size, colorWhite, text, 0, 0, ITEM_TEXTSTYLE_SHADOWED );
+
+ Com_sprintf( text, sizeof( text ),
+ "----- %s" S_COLOR_WHITE " -----",
+ ( sec ) ? va( "^%d%d", sec % 7, sec ) : S_COLOR_GREEN "FIGHT!" );
+
+ w = UI_Text_Width( text, size, 0 );
+ UI_Text_Paint( 320 - w / 2, 200 + 1.5f * h, size, colorWhite, text, 0, 0, ITEM_TEXTSTYLE_SHADOWED );
+}
+
//==================================================================================
/*
@@ -3206,6 +3241,7 @@ static void CG_Draw2D( void )
CG_DrawVote( TEAM_NONE );
CG_DrawVote( cg.predictedPlayerState.stats[ STAT_TEAM ] );
+ CG_DrawWarmup( );
CG_DrawQueue( );
// don't draw center string if scoreboard is up