void CG_HideScores_f() { if ( cg.intermissionStarted ) { return; } Rocket_ShowScoreboard( "scoreboard", false ); cg.showScores = false; }
// FIXME: Don't hardcode scoreboard ID void CG_ShowScores_f() { if ( cg.intermissionStarted ) { return; } if ( !cg.showScores ) { trap_PrepareKeyUp(); Rocket_ShowScoreboard( "scoreboard", true ); cg.showScores = true; } else { cg.showScores = false; } }
/* ================ CG_ConfigStringModified ================ */ static void CG_ConfigStringModified() { const char *str; int num; // update the config string state with the new data, keeping in sync // with the config strings in the engine. // The engine already checked the inputs num = atoi( CG_Argv( 1 ) ); cgs.gameState[num] = CG_Argv(2); // look up the individual string that was modified str = CG_ConfigString( num ); //CG_Printf("configstring modification %i: %s\n", num, str); // do something with it if necessary if ( num == CS_MUSIC ) { CG_StartMusic(); } else if ( num == CS_SERVERINFO ) { CG_ParseServerinfo(); } else if ( num == CS_WARMUP ) { CG_ParseWarmup(); } else if ( num == CS_LEVEL_START_TIME ) { cgs.levelStartTime = atoi( str ); } else if ( num >= CS_VOTE_TIME && num < CS_VOTE_TIME + NUM_TEAMS ) { cgs.voteTime[ num - CS_VOTE_TIME ] = atoi( str ); cgs.voteModified[ num - CS_VOTE_TIME ] = true; if ( num - CS_VOTE_TIME == TEAM_NONE ) { trap_Cvar_Set( "ui_voteActive", cgs.voteTime[ TEAM_NONE ] ? "1" : "0" ); } else if ( num - CS_VOTE_TIME == TEAM_ALIENS ) { trap_Cvar_Set( "ui_alienTeamVoteActive", cgs.voteTime[ TEAM_ALIENS ] ? "1" : "0" ); } else if ( num - CS_VOTE_TIME == TEAM_HUMANS ) { trap_Cvar_Set( "ui_humanTeamVoteActive", cgs.voteTime[ TEAM_HUMANS ] ? "1" : "0" ); } } else if ( num >= CS_VOTE_YES && num < CS_VOTE_YES + NUM_TEAMS ) { cgs.voteYes[ num - CS_VOTE_YES ] = atoi( str ); cgs.voteModified[ num - CS_VOTE_YES ] = true; } else if ( num >= CS_VOTE_NO && num < CS_VOTE_NO + NUM_TEAMS ) { cgs.voteNo[ num - CS_VOTE_NO ] = atoi( str ); cgs.voteModified[ num - CS_VOTE_NO ] = true; } else if ( num >= CS_VOTE_STRING && num < CS_VOTE_STRING + NUM_TEAMS ) { Q_strncpyz( cgs.voteString[ num - CS_VOTE_STRING ], str, sizeof( cgs.voteString[ num - CS_VOTE_STRING ] ) ); } else if ( num >= CS_VOTE_CALLER && num < CS_VOTE_CALLER + NUM_TEAMS ) { Q_strncpyz( cgs.voteCaller[ num - CS_VOTE_CALLER ], str, sizeof( cgs.voteCaller[ num - CS_VOTE_CALLER ] ) ); } else if ( num == CS_INTERMISSION ) { cg.intermissionStarted = atoi( str ); if ( cg.intermissionStarted ) { Rocket_ShowScoreboard( "scoreboard", true ); } } else if ( num >= CS_MODELS && num < CS_MODELS + MAX_MODELS ) { cgs.gameModels[ num - CS_MODELS ] = trap_R_RegisterModel( str ); } else if ( num >= CS_SHADERS && num < CS_SHADERS + MAX_GAME_SHADERS ) { cgs.gameShaders[ num - CS_SHADERS ] = trap_R_RegisterShader(str, RSF_DEFAULT); } else if ( num >= CS_GRADING_TEXTURES && num < CS_GRADING_TEXTURES + MAX_GRADING_TEXTURES ) { CG_RegisterGrading( num - CS_GRADING_TEXTURES, str ); } else if ( num >= CS_PARTICLE_SYSTEMS && num < CS_PARTICLE_SYSTEMS + MAX_GAME_PARTICLE_SYSTEMS ) { cgs.gameParticleSystems[ num - CS_PARTICLE_SYSTEMS ] = CG_RegisterParticleSystem( ( char * ) str ); } else if ( num >= CS_SOUNDS && num < CS_SOUNDS + MAX_SOUNDS ) { if ( str[ 0 ] != '*' ) { // player specific sounds don't register here cgs.gameSounds[ num - CS_SOUNDS ] = trap_S_RegisterSound( str, false ); } } else if ( num >= CS_PLAYERS && num < CS_PLAYERS + MAX_CLIENTS ) { CG_NewClientInfo( num - CS_PLAYERS ); CG_BuildSpectatorString(); } else if ( num == CS_WINNER ) { trap_Cvar_Set( "ui_winner", str ); } else if ( num == CS_SHADERSTATE ) { CG_ShaderStateChanged(); } }