From 8693e2c0a0ca3c5e9474fdf306ed53fac572960f Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Mon, 8 Aug 2011 01:30:16 +0000 Subject: * Add ready-related text to cg_tutorial during intermission --- src/cgame/cg_local.h | 1 + src/cgame/cg_main.c | 2 +- src/cgame/cg_tutorial.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 42b5e0e3..e47a89f6 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1556,6 +1556,7 @@ void CG_KeyEvent( int key, qboolean down ); void CG_MouseEvent( int x, int y ); void CG_EventHandling( int type ); void CG_SetScoreSelection( void *menu ); +qboolean CG_ClientIsReady( int clientNum ); void CG_BuildSpectatorString( void ); qboolean CG_FileExists( char *filename ); diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 159f4f37..356f6728 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1437,7 +1437,7 @@ static clientInfo_t * CG_InfoFromScoreIndex( int index, int team, int *scoreInde return &cgs.clientinfo[ cg.scores[ index ].client ]; } -static qboolean CG_ClientIsReady( int clientNum ) +qboolean CG_ClientIsReady( int clientNum ) { clientList_t ready; diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 8c3da0ca..6839c3a1 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -707,7 +707,23 @@ const char *CG_TutorialText( void ) } } } + } + else if( !cg.demoPlayback ) + { + if( !CG_ClientIsReady( ps->clientNum ) ) + { + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s when ready to continue\n", + CG_KeyNameForCommand( "+attack" ) ) ); + } + else + { + Q_strcat( text, MAX_TUTORIAL_TEXT, "Waiting for other players to be ready\n" ); + } + } + if( !cg.demoPlayback ) + { Q_strcat( text, MAX_TUTORIAL_TEXT, "Press ESC for the menu" ); } -- cgit