summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2004-03-01 06:00:41 +0000
committerTim Angus <tim@ngus.net>2004-03-01 06:00:41 +0000
commitc3cf4a2cf6b203359501e7f964512ba7e425e4b3 (patch)
treeca1b8cfe4a4de81575cef807be354ab4a3d685f9 /src/cgame
parent8de2853c89a624574402d82e541e2061cc121b4a (diff)
* Reimplemented the chasecam
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_draw.c31
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( );