summaryrefslogtreecommitdiff
path: root/src/cgame/cg_tutorial.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-02-26 11:00:56 +0000
committerTim Angus <tim@ngus.net>2006-02-26 11:00:56 +0000
commita59e1bf12d2fe0091eeb3ef3df8ce5a82baa1c8b (patch)
treecbd9c07aa6675ac4d6776414bf3d36d07e4329e1 /src/cgame/cg_tutorial.c
parent6d725eb07296b5ca6037e13fc6dac3d4df38de04 (diff)
* Fixed bogus tutorial text when spectating
* Fixed tesla/reactor trails getting too long
Diffstat (limited to 'src/cgame/cg_tutorial.c')
-rw-r--r--src/cgame/cg_tutorial.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c
index 59d83625..aa4a6c79 100644
--- a/src/cgame/cg_tutorial.c
+++ b/src/cgame/cg_tutorial.c
@@ -496,36 +496,33 @@ CG_SpectatorText
*/
static void CG_SpectatorText( char *text, playerState_t *ps )
{
- if( ps->pm_type == PM_SPECTATOR )
+ if( ps->pm_flags & PMF_FOLLOW )
+ {
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ va( "Press %s to return to free spectator mode\n",
+ CG_KeyNameForCommand( "+button2" ) ) );
+
+ if( CG_PlayerCount( ) > 1 )
+ {
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ va( "Press %s or ",
+ CG_KeyNameForCommand( "weapprev" ) ) );
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ va( "%s to change player\n",
+ CG_KeyNameForCommand( "weapnext" ) ) );
+ }
+ }
+ else if( ps->pm_type == PM_SPECTATOR )
{
Q_strcat( text, MAX_TUTORIAL_TEXT,
va( "Press %s to join a team\n",
CG_KeyNameForCommand( "+attack" ) ) );
- if( ps->pm_flags & PMF_FOLLOW )
+ if( CG_PlayerCount( ) > 0 )
{
Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "Press %s to return to free spectator mode\n",
+ va( "Press %s to enter spectator follow mode\n",
CG_KeyNameForCommand( "+button2" ) ) );
-
- if( CG_PlayerCount( ) > 1 )
- {
- Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "Press %s or ",
- CG_KeyNameForCommand( "weapprev" ) ) );
- Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "%s to change player\n",
- CG_KeyNameForCommand( "weapnext" ) ) );
- }
- }
- else
- {
- if( CG_PlayerCount( ) > 0 )
- {
- Q_strcat( text, MAX_TUTORIAL_TEXT,
- va( "Press %s to enter spectator follow mode\n",
- CG_KeyNameForCommand( "+button2" ) ) );
- }
}
}
else
@@ -555,8 +552,11 @@ const char *CG_TutorialText( void )
if( !cg.intermissionStarted )
{
- if( ps->persistant[ PERS_TEAM ] == TEAM_SPECTATOR )
+ if( ps->persistant[ PERS_TEAM ] == TEAM_SPECTATOR ||
+ ps->pm_flags & PMF_FOLLOW )
+ {
CG_SpectatorText( text, ps );
+ }
else if( ps->stats[ STAT_HEALTH ] > 0 )
{
switch( ps->stats[ STAT_PCLASS ] )