diff --git a/reaction/cgame/cg_scoreboard.c b/reaction/cgame/cg_scoreboard.c index eda99ae8..fd13902c 100644 --- a/reaction/cgame/cg_scoreboard.c +++ b/reaction/cgame/cg_scoreboard.c @@ -5,11 +5,8 @@ //----------------------------------------------------------------------------- // // $Log$ -// Revision 1.16 2002/03/23 05:17:42 jbravo -// Major cleanup of game -> cgame communication with LCA vars. -// -// Revision 1.15 2002/03/21 15:02:05 jbravo -// More teamname cleanups and fix for fraglines. +// Revision 1.17 2002/03/24 22:57:27 niceass +// VERY big scoreboard changes // // Revision 1.14 2002/03/17 21:32:23 jbravo // Fixed the dynamic teamnames system up a bit to reduce traffic @@ -55,438 +52,320 @@ // cg_scoreboard -- draw the scoreboard on top of the game screen #include "cg_local.h" - -#define SCOREBOARD_X (0) - -#define SB_HEADER 86 -#define SB_TOP (SB_HEADER+32) - -// Where the status bar starts, so we don't overwrite it -#define SB_STATUSBAR 420 - -#define SB_NORMAL_HEIGHT 40 -#define SB_INTER_HEIGHT 16 // interleaved height - -#define SB_MAXCLIENTS_NORMAL ((SB_STATUSBAR - SB_TOP) / SB_NORMAL_HEIGHT) -#define SB_MAXCLIENTS_INTER ((SB_STATUSBAR - SB_TOP) / SB_INTER_HEIGHT - 1) - -// Used when interleaved - - - -#define SB_LEFT_BOTICON_X (SCOREBOARD_X+0) -#define SB_LEFT_HEAD_X (SCOREBOARD_X+32) -#define SB_RIGHT_BOTICON_X (SCOREBOARD_X+64) -#define SB_RIGHT_HEAD_X (SCOREBOARD_X+96) -// Normal -#define SB_BOTICON_X (SCOREBOARD_X+32) -#define SB_HEAD_X (SCOREBOARD_X+64) - -#define SB_SCORELINE_X 112 - -#define SB_RATING_WIDTH (6 * BIGCHAR_WIDTH) // width 6 -#define SB_SCORE_X (SB_SCORELINE_X + BIGCHAR_WIDTH) // width 6 -#define SB_RATING_X (SB_SCORELINE_X + 6 * BIGCHAR_WIDTH) // width 6 -#define SB_PING_X (SB_SCORELINE_X + 12 * BIGCHAR_WIDTH + 8) // width 5 -#define SB_TIME_X (SB_SCORELINE_X + 17 * BIGCHAR_WIDTH + 8) // width 5 -#define SB_NAME_X (SB_SCORELINE_X + 22 * BIGCHAR_WIDTH) // width 15 - -// The new and improved score board -// -// In cases where the number of clients is high, the score board heads are interleaved -// here's the layout - -// -// 0 32 80 112 144 240 320 400 <-- pixel position -// bot head bot head score ping time name -// -// wins/losses are drawn on bot icon now - static qboolean localClient; // true if local client has been displayed -// NiceAss: -#define SB_WIDTH 280 // 285 -#define SB_START_HEIGHT 70 -#define SB_MIDDLE (SCREEN_WIDTH/2) -#define SB_LINE_WIDTH 1 -#define SB_PADDING (SB_LINE_WIDTH+2) +#define SB_WIDTH 330 +#define SB_FONTSIZEW 7 +#define SB_FONTSIZEH 14 +#define SB_PADDING 1 -/* -================= -CG_DrawScoreboard -================= -*/ -static void CG_DrawClientScore( int y, score_t *score, float *color, float fade, qboolean largeFormat ) { - char string[1024]; - vec3_t headAngles; +void DrawStrip(int y, int Height, qboolean Fill, qboolean Top, qboolean Bottom, float *FillC, float *BoarderC) { + + if (Fill) { + CG_FillRect( (SCREEN_WIDTH - SB_WIDTH) / 2, y, SB_WIDTH, Height+SB_PADDING*2, FillC ); + } + + if (Top) + CG_DrawCleanLine( (SCREEN_WIDTH - SB_WIDTH) / 2, y, SB_WIDTH, 1, BoarderC ); + + if (Bottom) + CG_DrawCleanLine( (SCREEN_WIDTH - SB_WIDTH) / 2, y+Height+SB_PADDING*2, SB_WIDTH, 1, BoarderC ); + + CG_DrawCleanSides( (SCREEN_WIDTH - SB_WIDTH) / 2, y, SB_WIDTH, Height+SB_PADDING*2, 1, BoarderC ); + +} + + void DrawLeftStripText(int y, int Height, char *Text, int maxChars, float *Color) { + CG_DrawStringExt( + (SCREEN_WIDTH - SB_WIDTH) / 2 + 2, + y + (Height+SB_PADDING*2-SB_FONTSIZEH) / 2, + Text, + Color, + qtrue, // Force color? + qfalse, // Shadow? + SB_FONTSIZEW, // charWidth + SB_FONTSIZEH, // charHeight + maxChars); // MaxChars +} + +void DrawStripText(int y, int x, int Height, char *Text, int maxChars, float *Color) { + CG_DrawStringExt( + (SCREEN_WIDTH - SB_WIDTH) / 2 + x, + y + (Height+SB_PADDING*2-SB_FONTSIZEH) / 2, + Text, + Color, + qtrue, // Force color? + qfalse, // Shadow? + SB_FONTSIZEW, // charWidth + SB_FONTSIZEH, // charHeight + maxChars); // MaxChars +} + +void DrawRightStripText(int y, int Height, char *Text, int maxChars, float *Color) { + int Len; + + Len = CG_DrawStrlen( Text ); + CG_DrawStringExt( + ((SCREEN_WIDTH + SB_WIDTH) / 2) - (Len * SB_FONTSIZEW) - 2, + y + (Height+SB_PADDING*2-SB_FONTSIZEH) / 2, + Text, + Color, + qtrue, // Force color? + qfalse, // Shadow? + SB_FONTSIZEW, // charWidth + SB_FONTSIZEH, // charHeight + maxChars); // MaxChars +} + +void DrawCenterStripText(int y, int Height, char *Text, int maxChars, float *Color) { + int Len; + + Len = CG_DrawStrlen( Text ); + CG_DrawStringExt( + (SCREEN_WIDTH - Len * SB_FONTSIZEW) / 2, + y + (Height+SB_PADDING*2-SB_FONTSIZEH) / 2, + Text, + Color, + qtrue, // Force color? + qfalse, // Shadow? + SB_FONTSIZEW, // charWidth + SB_FONTSIZEH, // charHeight + maxChars); // MaxChars +} + +static void CG_DrawTeamplayClientScore( int y, score_t *score, float *Fill, float *Boarder, float *Color ) { + char Tmp[128]; clientInfo_t *ci; - int iconx, headx; if ( score->client < 0 || score->client >= cgs.maxclients ) { Com_Printf( "Bad score->client: %i\n", score->client ); return; } - + ci = &cgs.clientinfo[score->client]; - iconx = SB_BOTICON_X + (SB_RATING_WIDTH / 2); - headx = SB_HEAD_X + (SB_RATING_WIDTH / 2); - - // draw the handicap or bot skill marker (unless player has flag) - if ( ci->powerups & ( 1 << PW_NEUTRALFLAG ) ) { - if( largeFormat ) { - CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_FREE, qfalse ); - } - else { - CG_DrawFlagModel( iconx, y, 16, 16, TEAM_FREE, qfalse ); - } - } else if ( ci->powerups & ( 1 << PW_REDFLAG ) ) { - if( largeFormat ) { - CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_RED, qfalse ); - } - else { - CG_DrawFlagModel( iconx, y, 16, 16, TEAM_RED, qfalse ); - } - } else if ( ci->powerups & ( 1 << PW_BLUEFLAG ) ) { - if( largeFormat ) { - CG_DrawFlagModel( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, TEAM_BLUE, qfalse ); - } - else { - CG_DrawFlagModel( iconx, y, 16, 16, TEAM_BLUE, qfalse ); - } - } else { - if ( ci->botSkill > 0 && ci->botSkill <= 5 ) { - if ( cg_drawIcons.integer ) { - if( largeFormat ) { - CG_DrawPic( iconx, y - ( 32 - BIGCHAR_HEIGHT ) / 2, 32, 32, cgs.media.botSkillShaders[ ci->botSkill - 1 ] ); - } - else { - CG_DrawPic( iconx, y, 16, 16, cgs.media.botSkillShaders[ ci->botSkill - 1 ] ); - } - } - } else if ( ci->handicap < 100 ) { - Com_sprintf( string, sizeof( string ), "%i", ci->handicap ); - if ( cgs.gametype == GT_TOURNAMENT ) - CG_DrawSmallStringColor( iconx, y - SMALLCHAR_HEIGHT/2, string, color ); - else - CG_DrawSmallStringColor( iconx, y, string, color ); - } - - // draw the wins / losses - if ( cgs.gametype == GT_TOURNAMENT ) { - Com_sprintf( string, sizeof( string ), "%i/%i", ci->wins, ci->losses ); - if( ci->handicap < 100 && !ci->botSkill ) { - CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, string, color ); - } - else { - CG_DrawSmallStringColor( iconx, y, string, color ); - } - } - } - - // draw the face - VectorClear( headAngles ); - headAngles[YAW] = 180; - if( largeFormat ) { - CG_DrawHead( headx, y - ( ICON_SIZE - BIGCHAR_HEIGHT ) / 2, ICON_SIZE, ICON_SIZE, - score->client, headAngles ); - } - else { - CG_DrawHead( headx, y, 16, 16, score->client, headAngles ); - } - -#ifdef MISSIONPACK - // draw the team task - if ( ci->teamTask != TEAMTASK_NONE ) { - if ( ci->teamTask == TEAMTASK_OFFENSE ) { - CG_DrawPic( headx + 48, y, 16, 16, cgs.media.assaultShader ); - } - else if ( ci->teamTask == TEAMTASK_DEFENSE ) { - CG_DrawPic( headx + 48, y, 16, 16, cgs.media.defendShader ); - } - } -#endif - // draw the score line - if ( score->ping == -1 ) { - Com_sprintf(string, sizeof(string), - " connecting %s", ci->name); - } else if ( ci->team == TEAM_SPECTATOR ) { - Com_sprintf(string, sizeof(string), - " SPECT %3i %4i %s", score->ping, score->time, ci->name); - } else { - Com_sprintf(string, sizeof(string), - "%5i %4i %4i %s", score->score, score->ping, score->time, ci->name); - } - - // highlight your position - if ( score->client == cg.snap->ps.clientNum ) { - float hcolor[4]; - int rank; - - localClient = qtrue; - - if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR - || cgs.gametype >= GT_TEAM ) { - rank = -1; - } else { - rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG; - } - if ( rank == 0 ) { - hcolor[0] = 0; - hcolor[1] = 0; - hcolor[2] = 0.7f; - } else if ( rank == 1 ) { - hcolor[0] = 0.7f; - hcolor[1] = 0; - hcolor[2] = 0; - } else if ( rank == 2 ) { - hcolor[0] = 0.7f; - hcolor[1] = 0.7f; - hcolor[2] = 0; - } else { - hcolor[0] = 0.7f; - hcolor[1] = 0.7f; - hcolor[2] = 0.7f; - } - - hcolor[3] = fade * 0.7; - CG_FillRect( SB_SCORELINE_X + BIGCHAR_WIDTH + (SB_RATING_WIDTH / 2), y, - 640 - SB_SCORELINE_X - BIGCHAR_WIDTH, BIGCHAR_HEIGHT+1, hcolor ); - } - - CG_DrawBigString( SB_SCORELINE_X + (SB_RATING_WIDTH / 2), y, string, fade ); - - // add the "ready" marker for intermission exiting - if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << score->client ) ) { - CG_DrawBigStringColor( iconx, y, "READY", color ); - } -} - -static void CG_DrawTeamplayClientScore( int y, int x, score_t *score, float fade, float *color ) { - char string[1024]; - vec3_t headAngles; - clientInfo_t *ci; - int iconx, headx; - float hcolor[4]; - int size; - - if ( score->client < 0 || score->client >= cgs.maxclients ) { - Com_Printf( "Bad score->client: %i\n", score->client ); - return; - } + if (score->client == cg.clientNum) Fill[3] += 0.4f; + if (Fill[3] > 1) Fill[3] = 1; - ci = &cgs.clientinfo[score->client]; - - // Name: - CG_DrawStringExt( x, y, ci->name, color, qtrue, qfalse, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT, 17); + DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, Fill, Boarder); - if ( score->client == cg.snap->ps.clientNum ) { - MAKERGBA(hcolor, 0.0f, 0.0f, 0.0f, 0.5f); - CG_FillRect( x, y, SB_WIDTH-SB_PADDING*2, SMALLCHAR_HEIGHT, hcolor ); - } - - if (cg.scoreTPMode) { - if (score->ping == -1) - Com_sprintf(string, sizeof(string), - "Connecting"); - else - Com_sprintf(string, sizeof(string), - "%4i %4i", score->ping, score->time); - size = 11; - } - else { - if (score->ping == -1) - Com_sprintf(string, sizeof(string), - " Connecting"); - else - Com_sprintf(string, sizeof(string), - "%5i %6i", score->score, score->deaths); - size = 14; - } - - CG_DrawSmallString( x+SB_WIDTH-(SMALLCHAR_WIDTH*size)-6, y, string, fade ); + DrawLeftStripText(y, SB_FONTSIZEH, ci->name, 20, Color); + Com_sprintf(Tmp, 128, "%4i %4i %5i %6i", score->time, score->ping, score->score, 0); + DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, Color); } - - /* ================= -CG_TeamScoreboard -- By NiceAss +CG_TeamScoreboard + - By NiceAss ================= */ -static int CG_TeamplayScoreboard(int maxClients) +static int CG_TeamplayScoreboard(void) { - int i, red, blue, spec; - float color[4], Alpha, Alpha2; - score_t *score; clientInfo_t *ci; + int i; + int Reds, Blues, Spectators, Refs; + float Alpha; + score_t *Score; int y; - int size, players; - char *String; + int Alternate, First; + char teamname[128]; + int Ping, Frags, Damage; // Averages + char Tmp[128]; + + vec4_t White, Black, RedL, BlueL, GreyL, BlackL; + vec4_t RedD, BlueD, GreyD; if (cg.time > cg.scoreStartTime+300) { - Alpha = (cos((cg.time-cg.scoreStartTime) / 400.0f) + 1.0f) * 0.25f + 0.5f; - Alpha2 = (cos((cg.time-cg.scoreStartTime) / 400.0f) + 1.0f) * 0.5f; + Alpha = cos((cg.time-cg.scoreStartTime) / 400.0f) * 0.15f + 0.85f; } else { + // Fade in Alpha = (float)(cg.time-cg.scoreStartTime)/(float)300; if (Alpha > 1.0f) Alpha = 1.0f; } - red = blue = spec = 0; - for ( i = 0 ; i < cg.numScores && red+blue+spec < maxClients ; i++ ) { - score = &cg.scores[i]; - ci = &cgs.clientinfo[ score->client ]; - if (ci->team == TEAM_RED) red++; - if (ci->team == TEAM_BLUE) blue++; + MAKERGBA(White, 1.0f, 1.0f, 1.0f, 1.0f); + MAKERGBA(Black, 0.0f, 0.0f, 0.0f, 1.0f); + MAKERGBA(BlackL, 0.0f, 0.0f, 0.0f, 0.8f * Alpha); + MAKERGBA(RedD, 0.8f, 0.0f,0.0f, 0.8f * Alpha); + MAKERGBA(BlueD, 0.0f, 0.0f, 0.8f, 0.8f * Alpha); + MAKERGBA(GreyD, 0.3f, 0.3f, 0.3f, 0.84f * Alpha); + MAKERGBA(RedL, 0.8f, 0.0f,0.0f, 0.4f * Alpha); + MAKERGBA(BlueL, 0.0f, 0.0f, 0.8f, 0.4f * Alpha); + MAKERGBA(GreyL, 0.3f, 0.3f, 0.3f, 0.4f * Alpha); + + Reds = Blues = Spectators = Refs = 0; + + for ( i = 0 ; i < cg.numScores ; i++ ) { + Score = &cg.scores[i]; + ci = &cgs.clientinfo[ Score->client ]; + if (ci->team == TEAM_RED) Reds++; + if (ci->team == TEAM_BLUE) Blues++; + if (ci->team == TEAM_SPECTATOR) Spectators++; } - players = (red > blue) ? red : blue; - if (players == 0) players = 1; - size = (players*20)+SB_PADDING; - // Red: - MAKERGBA(color, 1.0f, 0.5f, 0.5f, 0.7f * Alpha); - CG_FillRect(SB_MIDDLE - SB_WIDTH - 6, SB_START_HEIGHT, - SB_WIDTH, SMALLCHAR_HEIGHT+(SB_PADDING*2), color); - MAKERGBA(color, 0.55f, 0.55f, 0.55f, 0.7f * Alpha); - CG_FillRect(SB_MIDDLE - SB_WIDTH - 6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*2), - SB_WIDTH, SMALLCHAR_HEIGHT+(SB_PADDING*2), color); - MAKERGBA(color, 0.6f, 0.5f, 0.5f, 0.5f * Alpha); - CG_FillRect(SB_MIDDLE - SB_WIDTH - 6, SB_START_HEIGHT+(SMALLCHAR_HEIGHT+(SB_PADDING*2))*2, - SB_WIDTH, size, color); + y = 20; // Starting height. - MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f); - CG_DrawCleanRect( SB_MIDDLE - SB_WIDTH - 6, SB_START_HEIGHT, - SB_WIDTH, (SMALLCHAR_HEIGHT+SB_PADDING*2)*2+size, SB_LINE_WIDTH, color ); - CG_DrawCleanRect( SB_MIDDLE - SB_WIDTH - 6, SB_START_HEIGHT + SMALLCHAR_HEIGHT+(SB_PADDING*2), - SB_WIDTH, (SMALLCHAR_HEIGHT+SB_PADDING*2), SB_LINE_WIDTH, color ); + if (cg.scoreTPMode == 1 || cgs.gametype < GT_TEAM) { + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlackL, White); + DrawLeftStripText(y, SB_FONTSIZEH, "Name", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Frags Damage", 100, White); + y += SB_FONTSIZEH+SB_PADDING*2+2; - - MAKERGBA(color, 0.0f, 0.0f, 0.0f, 1.0f); - CG_DrawSmallStringColor(SB_MIDDLE-SB_WIDTH+SB_PADDING-6, SB_START_HEIGHT+SB_PADDING, - cg_RQ3_team1name.string, color); + First = 0; + for ( i = 0 ; i < cg.numScores; i++ ) { + Score = &cg.scores[i]; + ci = &cgs.clientinfo[ Score->client ]; - MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f); - CG_DrawSmallStringColor(SB_MIDDLE-SB_WIDTH+SB_PADDING-6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Name", color); - if (cg.scoreTPMode) { - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING-6-(SMALLCHAR_WIDTH*11), SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Ping Time", color); + //DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, GreyL, White); + CG_DrawTeamplayClientScore(y, Score, GreyL, White, White); + if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, White); + y += SB_FONTSIZEH+SB_PADDING*2; + First = 1; + } + DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, White); + + return Reds+Blues+ceil(Spectators/2)+Refs; + } + + + // *************** RED TEAM *************** + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedD, Black); + trap_Cvar_VariableStringBuffer("g_RQ3_team1name", teamname, sizeof(teamname)); + DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, Black); + DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[0]), 100, White); + y += SB_FONTSIZEH+SB_PADDING*2+2; + + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Name", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Frags Damage", 100, White); + y += SB_FONTSIZEH+SB_PADDING*2+2; + + Ping = Frags = Damage = 0; + if (Reds) { + First = 0; + + for ( i = 0 ; i < cg.numScores; i++ ) { + Score = &cg.scores[i]; + ci = &cgs.clientinfo[ Score->client ]; + + if (ci->team == TEAM_RED) { + CG_DrawTeamplayClientScore(y, Score, RedL, Black, White); + if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, RedL, Black); + y += SB_FONTSIZEH+SB_PADDING*2; + Ping += Score->ping; + Frags += Score->score; + First = 1; + + } + } + DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, RedL, Black); } else { - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING-6-(SMALLCHAR_WIDTH*14), SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Frags Deaths", color); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, RedL, Black); + DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, White); + y += SB_FONTSIZEH+SB_PADDING*2; } + y += 2; + Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Reds), Frags, Damage); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + y += SB_FONTSIZEH+SB_PADDING*2; - // Blue: - MAKERGBA(color, 0.5f, 0.5f, 1.0f, 0.7f * Alpha); - CG_FillRect(SB_MIDDLE + 6, SB_START_HEIGHT, - SB_WIDTH, SMALLCHAR_HEIGHT+(SB_PADDING*2), color); - MAKERGBA(color, 0.55f, 0.55f, 0.55f, 0.7f * Alpha); - CG_FillRect(SB_MIDDLE + 6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*2), - SB_WIDTH, SMALLCHAR_HEIGHT+(SB_PADDING*2), color); - MAKERGBA(color, 0.5f, 0.5f, 0.6f, 0.5f * Alpha); - CG_FillRect(SB_MIDDLE + 6, SB_START_HEIGHT+(SMALLCHAR_HEIGHT+(SB_PADDING*2))*2, - SB_WIDTH, size, color); + // *************** BLUE TEAM ************ + y += SB_FONTSIZEH*1.5; + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueD, Black); + trap_Cvar_VariableStringBuffer("g_RQ3_team2name", teamname, sizeof(teamname)); + DrawStripText(y, 50, SB_FONTSIZEH, teamname, 100, Black); + DrawRightStripText(y, SB_FONTSIZEH, va("Wins: %d", cg.teamScores[1]), 100, White); + y += SB_FONTSIZEH+SB_PADDING*2+2; - MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f); - CG_DrawCleanRect( SB_MIDDLE + 6, SB_START_HEIGHT, - SB_WIDTH, (SMALLCHAR_HEIGHT+SB_PADDING*2)*2+size, SB_LINE_WIDTH, color ); - CG_DrawCleanRect( SB_MIDDLE + 6, SB_START_HEIGHT + SMALLCHAR_HEIGHT+(SB_PADDING*2), - SB_WIDTH, (SMALLCHAR_HEIGHT+SB_PADDING*2), SB_LINE_WIDTH, color ); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Name", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, "Time Ping Frags Damage", 100, White); + y += SB_FONTSIZEH+SB_PADDING*2+2; - MAKERGBA(color, 0.0f, 0.0f, 0.0f, 1.0f); - CG_DrawSmallStringColor(SB_MIDDLE+SB_PADDING+6, SB_START_HEIGHT+SB_PADDING, - cg_RQ3_team2name.string, color); + Ping = Frags = Damage = 0; + if (Blues) { + First = 0; + + for ( i = 0 ; i < cg.numScores; i++ ) { + Score = &cg.scores[i]; + ci = &cgs.clientinfo[ Score->client ]; - MAKERGBA(color, 1.0f, 1.0f, 1.0f, 0.8f); - CG_DrawSmallStringColor(SB_MIDDLE+SB_PADDING+6, SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Name", color); - if (cg.scoreTPMode) { - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING+6+SB_WIDTH-(SMALLCHAR_WIDTH*11), SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Ping Time", color); + if (ci->team == TEAM_BLUE) { + CG_DrawTeamplayClientScore(y, Score, BlueL, Black, White); + if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, BlueL, Black); + y += SB_FONTSIZEH+SB_PADDING*2; + Ping += Score->ping; + Frags += Score->score; + //Damage += Score->damage; + First = 1; + } + } + DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, BlueL, Black); } else { - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING+6+SB_WIDTH-(SMALLCHAR_WIDTH*14), SB_START_HEIGHT+SMALLCHAR_HEIGHT+(SB_PADDING*3), - "Frags Deaths", color); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, BlueL, Black); + DrawCenterStripText(y, SB_FONTSIZEH, "No team members", 100, White); + y += SB_FONTSIZEH+SB_PADDING*2; } - String = va("Wins: %d ", cg.teamScores[0]); - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING-6-(SMALLCHAR_WIDTH*strlen(String)), - SB_START_HEIGHT+SB_PADDING, String, color); + y += 2; + Com_sprintf(Tmp, 128, "%4d %5d %6d", (int)((float)Ping / (float)Blues), Frags, Damage ); + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyL, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Averages/Totals:", 100, White); + DrawRightStripText(y, SB_FONTSIZEH, Tmp, 100, White); + y += SB_FONTSIZEH+SB_PADDING*2; - String = va("Wins: %d ", cg.teamScores[1]); - CG_DrawSmallStringColor(SB_MIDDLE-SB_PADDING+6+SB_WIDTH-(SMALLCHAR_WIDTH*strlen(String)), - SB_START_HEIGHT+SB_PADDING, String, color); + // *************** SPECTATORS ************ + if (Spectators) { + Alternate = 1; + First = 0; + y += SB_FONTSIZEH*1.5; + DrawStrip(y, SB_FONTSIZEH, qtrue, qtrue, qtrue, GreyD, Black); + DrawLeftStripText(y, SB_FONTSIZEH, "Spectators", 100, Black); + y += SB_FONTSIZEH+SB_PADDING*2+2; - // Individual player info - MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - y = SB_START_HEIGHT+(SMALLCHAR_HEIGHT+(SB_PADDING*2))*2 + SB_PADDING; - red = blue = spec = 0; - for ( i = 0 ; i < cg.numScores && red+blue+spec < maxClients ; i++ ) { - score = &cg.scores[i]; - ci = &cgs.clientinfo[ score->client ]; + for ( i = 0 ; i < cg.numScores; i++ ) { + Score = &cg.scores[i]; + ci = &cgs.clientinfo[ Score->client ]; - if (ci->team == TEAM_RED) { - CG_DrawTeamplayClientScore( y + 20 * red, SB_MIDDLE-SB_WIDTH+SB_PADDING-6, score, 1.0f, color); - red++; - } - else if (ci->team == TEAM_BLUE) { - CG_DrawTeamplayClientScore( y + 20 * blue, SB_MIDDLE+SB_PADDING+6, score, 1.0f, color); - blue++; - } - else if (ci->team == TEAM_SPECTATOR) { - CG_DrawTeamplayClientScore( y + (20 * players) + (20 * spec) + SB_PADDING*2, - SB_MIDDLE-SB_WIDTH+SB_PADDING-6, score, 1.0f, color); - spec++; + if (ci->team == TEAM_SPECTATOR) { + DrawStrip(y, SB_FONTSIZEH, qtrue, qfalse, qfalse, GreyL, Black); + if (First == 0) DrawStrip(y, SB_FONTSIZEH, qfalse, qtrue, qfalse, GreyL, Black); + + if (Alternate == 1) { + DrawLeftStripText(y, SB_FONTSIZEH, ci->name, 20, White); + } + else { + DrawRightStripText(y, SB_FONTSIZEH, ci->name, 20, White); + y += SB_FONTSIZEH+SB_PADDING*2; + } + Alternate = -Alternate; + First = 1; + } } + + if (Alternate == 1) + DrawStrip(y - (SB_FONTSIZEH+SB_PADDING*2), SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, Black); + else + DrawStrip(y, SB_FONTSIZEH, qfalse, qfalse, qtrue, GreyL, Black); } // NiceAss: I added this so it will update while open. It normally only would update when first opened. - if ( cg.scoresRequestTime + 3000 < cg.time ) { - // the scores are more than two seconds out of data, - // so request new ones + if ( cg.scoresRequestTime + 2000 < cg.time ) { cg.scoresRequestTime = cg.time; trap_SendClientCommand( "score" ); } - - return red+blue+spec; + return Reds+Blues+ceil(Spectators/2)+Refs; } -/* -================= -CG_TeamScoreboard -================= -*/ -static int CG_TeamScoreboard( int y, team_t team, float fade, int maxClients, int lineHeight ) { - int i; - score_t *score; - float color[4]; - int count; - clientInfo_t *ci; - - color[0] = color[1] = color[2] = 1.0; - color[3] = fade; - - count = 0; - for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ ) { - score = &cg.scores[i]; - ci = &cgs.clientinfo[ score->client ]; - - if ( team != ci->team ) { - continue; - } - - CG_DrawClientScore( y + lineHeight * count, score, color, fade, lineHeight == SB_NORMAL_HEIGHT ); - - count++; - } - - return count; -} /* ================= @@ -496,13 +375,6 @@ Draw the normal in-game scoreboard ================= */ qboolean CG_DrawOldScoreboard( void ) { - int x, y, w, i, n1, n2; - float fade; - float *fadeColor; - char *s; - int maxClients; - int lineHeight; - int topBorderSize, bottomBorderSize; // don't draw amuthing if the menu or console is up if ( cg_paused.integer ) { @@ -515,117 +387,14 @@ qboolean CG_DrawOldScoreboard( void ) { return qfalse; } + if (!cg.showScores) return qfalse; + // don't draw scoreboard during death while warmup up - if ( cg.warmup && !cg.showScores ) { + if ( cg.warmup ) { return qfalse; } - if ( cg.showScores || cg.predictedPlayerState.pm_type == PM_DEAD || - cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { - fade = 1.0; - fadeColor = colorWhite; - } else { - fadeColor = CG_FadeColor( cg.scoreFadeTime, FADE_TIME ); - - if ( !fadeColor ) { - // next time scoreboard comes up, don't print killer - cg.deferredPlayerLoading = 0; - cg.killerName[0] = 0; - return qfalse; - } - fade = *fadeColor; - } - - - // fragged by ... line - if ( cg.killerName[0] ) { - s = va("Fragged by %s", cg.killerName ); - w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; - x = ( SCREEN_WIDTH - w ) / 2; - y = 40; - CG_DrawBigString( x, y, s, fade ); - } - - // current rank - if ( cgs.gametype < GT_TEAM) { - if (cg.snap->ps.persistant[PERS_TEAM] != TEAM_SPECTATOR ) { - s = va("%s place with %i", - CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ), - cg.snap->ps.persistant[PERS_SCORE] ); - w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; - x = ( SCREEN_WIDTH - w ) / 2; - y = 60; - CG_DrawBigString( x, y, s, fade ); - } - } - // NiceAss: No - /*else { - if ( cg.teamScores[0] == cg.teamScores[1] ) { - s = va("Teams are tied at %i", cg.teamScores[0] ); - } else if ( cg.teamScores[0] >= cg.teamScores[1] ) { - s = va("Red leads %i to %i",cg.teamScores[0], cg.teamScores[1] ); - } else { - s = va("Blue leads %i to %i",cg.teamScores[1], cg.teamScores[0] ); - } - - w = CG_DrawStrlen( s ) * BIGCHAR_WIDTH; - x = ( SCREEN_WIDTH - w ) / 2; - y = 60; - CG_DrawBigString( x, y, s, fade ); - } -*/ - // scoreboard - if ( cgs.gametype < GT_TEAM) { - y = SB_HEADER; - - CG_DrawPic( SB_SCORE_X + (SB_RATING_WIDTH / 2), y, 64, 32, cgs.media.scoreboardScore ); - CG_DrawPic( SB_PING_X - (SB_RATING_WIDTH / 2), y, 64, 32, cgs.media.scoreboardPing ); - CG_DrawPic( SB_TIME_X - (SB_RATING_WIDTH / 2), y, 64, 32, cgs.media.scoreboardTime ); - CG_DrawPic( SB_NAME_X - (SB_RATING_WIDTH / 2), y, 64, 32, cgs.media.scoreboardName ); - } - - y = SB_TOP; - - // If there are more than SB_MAXCLIENTS_NORMAL, use the interleaved scores - if ( cg.numScores > SB_MAXCLIENTS_NORMAL ) { - maxClients = SB_MAXCLIENTS_INTER; - lineHeight = SB_INTER_HEIGHT; - topBorderSize = 8; - bottomBorderSize = 16; - } else { - maxClients = SB_MAXCLIENTS_NORMAL; - lineHeight = SB_NORMAL_HEIGHT; - topBorderSize = 16; - bottomBorderSize = 16; - } - - localClient = qfalse; - - if ( cgs.gametype >= GT_TEAM ) { - // - // teamplay scoreboard - // - n1 = CG_TeamplayScoreboard(maxClients); - maxClients -= n1; - } else { - // - // free for all scoreboard - // - n1 = CG_TeamScoreboard( y, TEAM_FREE, fade, maxClients, lineHeight ); - y += (n1 * lineHeight) + BIGCHAR_HEIGHT; - n2 = CG_TeamScoreboard( y, TEAM_SPECTATOR, fade, maxClients - n1, lineHeight ); - y += (n2 * lineHeight) + BIGCHAR_HEIGHT; - } - - if (!localClient && cgs.gametype < GT_TEAM) { - // draw local client at the bottom - for ( i = 0 ; i < cg.numScores ; i++ ) { - if ( cg.scores[i].client == cg.snap->ps.clientNum ) { - CG_DrawClientScore( y, &cg.scores[i], fadeColor, fade, lineHeight == SB_NORMAL_HEIGHT ); - break; - } - } - } + CG_TeamplayScoreboard(); // load any models that have been deferred if ( ++cg.deferredPlayerLoading > 10 ) { @@ -642,6 +411,7 @@ qboolean CG_DrawOldScoreboard( void ) { CG_CenterGiantLine ================ */ + static void CG_CenterGiantLine( float y, const char *string ) { float x; vec4_t color; @@ -663,6 +433,7 @@ CG_DrawTourneyScoreboard Draw the oversize scoreboard for tournements ================= */ + void CG_DrawOldTourneyScoreboard( void ) { const char *s; vec4_t color; @@ -763,12 +534,9 @@ CG_DrawWeaponStats void CG_DrawWeaponStats(void) { - int i, red, blue, spec, offset; + int i, offset; float color[4], Alpha, Alpha2; - - clientInfo_t *ci; - int y; - int size, players; + int size; char String[80]; if (cg.time > cg.wstatsStartTime+300) { @@ -780,7 +548,7 @@ void CG_DrawWeaponStats(void) if (Alpha > 1.0f) Alpha = 1.0f; } //make room for 8 weapon stats - size = (10*20)+SB_PADDING; + size = (10*20)+WS_PADDING; @@ -791,7 +559,7 @@ void CG_DrawWeaponStats(void) //Box for scores, etc MAKERGBA(color, 0.55f, 0.55f, 0.55f, 0.7f * Alpha); - CG_FillRect(WS_LEFTSIDE, WS_TOP+SMALLCHAR_HEIGHT+(SB_PADDING*2), + CG_FillRect(WS_LEFTSIDE, WS_TOP+SMALLCHAR_HEIGHT+(WS_PADDING*2), WS_WIDTH, SMALLCHAR_HEIGHT+(WS_PADDING*2), color); //Box for weapon stuff @@ -820,99 +588,99 @@ void CG_DrawWeaponStats(void) //Fill in the top bar offset = 7; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6, WS_TOP + SB_PADDING, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6, WS_TOP + WS_PADDING, "Score", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7, WS_TOP + SB_PADDING, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7, WS_TOP + WS_PADDING, "Net", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 2, WS_TOP + SB_PADDING, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 2, WS_TOP + WS_PADDING, "K/D/S", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 3, WS_TOP + SB_PADDING, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 3, WS_TOP + WS_PADDING, "TK's", color); // MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); -// CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 4, WS_TOP + SB_PADDING, +// CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 4, WS_TOP + WS_PADDING, // "Efficiency", color); Com_sprintf(String, sizeof(String), "%4i",cg.snap->ps.persistant[PERS_SCORE]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 3 + SMALLCHAR_HEIGHT, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 3 + SMALLCHAR_HEIGHT, String, color); Com_sprintf(String, sizeof(String), "%3i",cg.snap->ps.persistant[PERS_SCORE] - cg.snap->ps.persistant[PERS_KILLED]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 - 1, WS_TOP + SB_PADDING * 3 + SMALLCHAR_HEIGHT, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 - 1, WS_TOP + WS_PADDING * 3 + SMALLCHAR_HEIGHT, String, color); Com_sprintf(String, sizeof(String), "%i/%i/%i",cg.records[REC_KILLS],cg.snap->ps.persistant[PERS_KILLED],cg.records[REC_SUICIDES]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 2, WS_TOP + SB_PADDING * 3 + SMALLCHAR_HEIGHT, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 2, WS_TOP + WS_PADDING * 3 + SMALLCHAR_HEIGHT, String, color); Com_sprintf(String, sizeof(String), "%4i",cg.records[REC_TEAMKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 3, WS_TOP + SB_PADDING * 3 + SMALLCHAR_HEIGHT, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * 7 * 3, WS_TOP + WS_PADDING * 3 + SMALLCHAR_HEIGHT, String, color); i=2; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Weapon Stats", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Knife(slash)", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Knife(throw)", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "MK23", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "MP5", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "M3", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "M4", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "HC", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "SSG3000", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Akimbo", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Grenade", color); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Kicks", color); @@ -921,57 +689,57 @@ void CG_DrawWeaponStats(void) i=2; offset=15; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Accuracy", color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_KNIFESLASHHITS]/(cg.records[REC_KNIFESLASHSHOTS] ? cg.records[REC_KNIFESLASHSHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_KNIFETHROWHITS]/(cg.records[REC_KNIFETHROWSHOTS] ? cg.records[REC_KNIFETHROWSHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_MK23HITS]/(cg.records[REC_MK23SHOTS] ? cg.records[REC_MK23SHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_MP5HITS]/(cg.records[REC_MP5SHOTS] ? cg.records[REC_MP5SHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_M3HITS]/(cg.records[REC_M3SHOTS] ? cg.records[REC_M3SHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_M4HITS]/(cg.records[REC_M4SHOTS] ? cg.records[REC_M4SHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_HANDCANNONHITS]/(cg.records[REC_HANDCANNONSHOTS] ? cg.records[REC_HANDCANNONSHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_SSG3000HITS]/(cg.records[REC_SSG3000SHOTS] ? cg.records[REC_SSG3000SHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_AKIMBOHITS]/(cg.records[REC_AKIMBOSHOTS] ? cg.records[REC_AKIMBOSHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%.1f%%",100 * (float)cg.records[REC_GRENADEHITS]/(cg.records[REC_GRENADESHOTS] ? cg.records[REC_GRENADESHOTS] : 1)); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); @@ -980,243 +748,243 @@ void CG_DrawWeaponStats(void) i=2; offset=25; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Hits", color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFESLASHHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFETHROWHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MK23HITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MP5HITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M3HITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M4HITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_HANDCANNONHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_SSG3000HITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_AKIMBOHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_GRENADEHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KICKHITS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); //Shots i=2; offset = 32; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset - 1), WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset - 1), WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Shots", color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFESLASHSHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFETHROWSHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MK23SHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MP5SHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M3SHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M4SHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_HANDCANNONSHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_SSG3000SHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_AKIMBOSHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_GRENADESHOTS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); //Kills i=2; offset = 39; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset - 1), WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset - 1), WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Kills", color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFESLASHKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFETHROWKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MK23KILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MP5KILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M3KILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M4KILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_HANDCANNONKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_SSG3000KILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_AKIMBOKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_GRENADEKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KICKKILLS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); //Deaths i=2; offset = 47; MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset -2), WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * (offset -2), WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, "Deaths", color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFESLASHDEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KNIFETHROWDEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MK23DEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_MP5DEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M3DEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_M4DEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_HANDCANNONDEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_SSG3000DEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_AKIMBODEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_GRENADEDEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); Com_sprintf(String, sizeof(String), "%4d",cg.records[REC_KICKDEATHS]); MAKERGBA(color, 1.0f, 1.0f, 1.0f, 1.0f); - CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + SB_PADDING * 4 + SMALLCHAR_HEIGHT * i++, + CG_DrawSmallStringColor(WS_LEFTSIDE + 6 + SMALLCHAR_WIDTH * offset, WS_TOP + WS_PADDING * 4 + SMALLCHAR_HEIGHT * i++, String, color); if ( cg.wstatsRequestTime + 3000 < cg.time ) {