diff options
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 31 |
1 files changed, 31 insertions, 0 deletions
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( ); |