static void CG_Rocket_DFGearOrReady( int handle, const char *data ) { int clientNum = atoi( Info_ValueForKey( data, "1" ) ); if ( cg.intermissionStarted ) { if ( CG_ClientIsReady( clientNum ) ) { Rocket_DataFormatterFormattedData( handle, "[check]", true ); } else { Rocket_DataFormatterFormattedData( handle, "", false ); } } else { score_t *s = ScoreFromClientNum( clientNum ); const char *rml = ""; if ( s && s->team == cg.predictedPlayerState.persistant[ PERS_TEAM ] && s->weapon != WP_NONE ) { rml = va( "<img src='/%s'/>", CG_GetShaderNameFromHandle( cg_weapons[ s->weapon ].weaponIcon ) ); } if ( s && s->team == cg.predictedPlayerState.persistant[ PERS_TEAM ] && s->team == TEAM_HUMANS && s->upgrade != UP_NONE ) { rml = va( "%s<img src='/%s'/>", rml, CG_GetShaderNameFromHandle( cg_upgrades[ s->upgrade ].upgradeIcon ) ); } Rocket_DataFormatterFormattedData( handle, rml, false ); } }
/* =============== CG_TutorialText Returns context help for the current class/weapon =============== */ const char *CG_TutorialText() { playerState_t *ps; static char text[ MAX_TUTORIAL_TEXT ]; static int refreshBindings = 0; text[ 0 ] = '\0'; ps = &cg.snap->ps; if ( refreshBindings == 0 ) { CG_GetBindings( (team_t) ps->persistant[ PERS_TEAM ] ); } refreshBindings = ( refreshBindings + 1 ) % BINDING_REFRESH_INTERVAL; if ( !cg.intermissionStarted && !cg.demoPlayback ) { if ( ps->persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT || ps->pm_flags & PMF_FOLLOW ) { CG_SpectatorText( text, ps ); } else if ( ps->stats[ STAT_HEALTH ] > 0 ) { switch ( ps->stats[ STAT_CLASS ] ) { case PCL_ALIEN_BUILDER0: case PCL_ALIEN_BUILDER0_UPG: CG_AlienBuilderText( text, ps ); break; case PCL_ALIEN_LEVEL0: CG_AlienLevel0Text( text, ps ); break; case PCL_ALIEN_LEVEL1: CG_AlienLevel1Text( text ); break; case PCL_ALIEN_LEVEL2: case PCL_ALIEN_LEVEL2_UPG: CG_AlienLevel2Text( text, ps ); break; case PCL_ALIEN_LEVEL3: case PCL_ALIEN_LEVEL3_UPG: CG_AlienLevel3Text( text, ps ); break; case PCL_ALIEN_LEVEL4: CG_AlienLevel4Text( text, ps ); break; case PCL_HUMAN_NAKED: case PCL_HUMAN_LIGHT: case PCL_HUMAN_MEDIUM: case PCL_HUMAN_BSUIT: CG_HumanText( text, ps ); break; default: break; } if ( ps->persistant[ PERS_TEAM ] == TEAM_ALIENS ) { if ( BG_AlienCanEvolve( ps->stats[ STAT_CLASS ], ps->persistant[ PERS_CREDIT ] ) ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( _( "Press %s to evolve\n" ), CG_KeyNameForCommand( "+activate" ) ) ); } } } } 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, va( _( "Press %s to open the console\n" ), CG_KeyNameForCommand( "toggleconsole" ) ) ); Q_strcat( text, MAX_TUTORIAL_TEXT, _( "Press ESC for the menu" ) ); } return text; }