From c3cf4a2cf6b203359501e7f964512ba7e425e4b3 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Mon, 1 Mar 2004 06:00:41 +0000 Subject: * Reimplemented the chasecam --- src/cgame/cg_draw.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/cgame') diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index fa046dbb..2158379c 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2844,6 +2844,36 @@ static void CG_DrawIntermission( void ) cg.scoreBoardShowing = CG_DrawScoreboard( ); } +#define FOLLOWING_STRING "following " + +/* +================= +CG_DrawFollow +================= +*/ +static qboolean CG_DrawFollow( void ) +{ + float w; + vec4_t color; + char buffer[ MAX_STRING_CHARS ]; + + if( !( cg.snap->ps.pm_flags & PMF_FOLLOW ) ) + return qfalse; + + color[ 0 ] = 1; + color[ 1 ] = 1; + color[ 2 ] = 1; + color[ 3 ] = 1; + + strcpy( buffer, FOLLOWING_STRING ); + strcat( buffer, cgs.clientinfo[ cg.snap->ps.clientNum ].name ); + + 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; +} + //================================================================================== #define SPECTATOR_STRING "SPECTATOR" @@ -2901,6 +2931,7 @@ static void CG_Draw2D( void ) CG_DrawVote( ); CG_DrawTeamVote( ); + CG_DrawFollow( ); // don't draw center string if scoreboard is up cg.scoreBoardShowing = CG_DrawScoreboard( ); -- cgit