## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License ## Derivative works may only be done if they are distributed with their source code. ## ## The original etpub_pcr_ah source and binaries can be found around http://www.patheticcockroach.com/etserver/etpub_pcr.php ## ## Note : ETPub PCR alpha hacks are just small modifications for ETPub (http://www.etpub.org) With the new code that show spectators' score, a connecting player now appears as "SPECT CONNECTING"... Let's try to fix this, now : - connecting players look like CONN score CONN (CONN in red) - zombies look like ZOMB score ZOMB (ZOMB is orange) - spec look like SPEC score ping (SPEC in yellow) ------------------------- MODIFICATION STARTS HERE NB : Replaced ^3CONNECTING with ^1CONNECTING src\cgame\cg_scoreboard.c : (line 301) **** REPLACE if ( ci->team == TEAM_SPECTATOR ) { /*const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; // CHRUKER: b031 - Show connecting people as connecting if (score->ping == -1) { s = CG_TranslateString( "^3CONNECTING" ); } else if (score->ping == 999) { s = CG_TranslateString( "^3ZOMBIE" ); } else { s = CG_TranslateString( "^3SPECTATOR" ); } w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return;*/ CG_DrawSmallString( tempx, y, "^3SPECT", fade ); } **** WITH if ( ci->team == TEAM_SPECTATOR ) { const char *s; /*int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8;*/ // CHRUKER: b031 - Show connecting people as connecting if (score->ping == -1) { s = CG_TranslateString( "^1CONN" ); } else if (score->ping == 999) { s = CG_TranslateString( "^8ZOMB" ); } else { s = CG_TranslateString( "^3SPEC" ); } /*w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return;*/ CG_DrawSmallString( tempx, y, s, fade ); } (line 495) **** REPLACE if ( ci->team == TEAM_SPECTATOR ) { /*const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; // CHRUKER: b031 - Show connecting people as connecting if (score->ping == -1) { s = CG_TranslateString( "^3CONNECTING" ); } else if (score->ping == 999) { //forty - zombied out spectators. s = CG_TranslateString( "^3ZOMBIE" ); } else { s = CG_TranslateString( "^3SPECTATOR" ); } w = CG_DrawStrlen( s ) * MINICHAR_WIDTH; // CHRUKER: b034 - Using the mini char height CG_DrawStringExt( tempx + totalwidth - w, y, s, hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); return;*/ CG_DrawStringExt( tempx, y, "^3SPECT", hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); } **** WITH if ( ci->team == TEAM_SPECTATOR ) { const char *s; /*int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8;*/ // CHRUKER: b031 - Show connecting people as connecting if (score->ping == -1) { s = CG_TranslateString( "^1CONN" ); } else if (score->ping == 999) { //forty - zombied out spectators. s = CG_TranslateString( "^8ZOMB" ); } else { s = CG_TranslateString( "^3SPEC" ); } /*w = CG_DrawStrlen( s ) * MINICHAR_WIDTH; // CHRUKER: b034 - Using the mini char height CG_DrawStringExt( tempx + totalwidth - w, y, s, hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); return;*/ CG_DrawStringExt( tempx, y, s, hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); } (line 326) **** COMMENT OUT //forty - connecting players if ( score->ping == -1) { const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; s = CG_TranslateString( "^1CONNECTING" ); w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return; } //forty - zombied out players if ( score->ping == 999) { const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; s = CG_TranslateString( "^3ZOMBIE" ); w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return; } (line 372) **** REPLACE CG_DrawSmallString( tempx, y, va( "%4i", score->ping ), fade ); tempx += INFO_LATENCY_WIDTH; **** WITH // PatheticCockroach - connecting players if ( score->ping == -1) { CG_DrawSmallString( tempx, y, "^1CONN", fade ); return; } // PatheticCockroach - zombied out players if ( score->ping == 999) { CG_DrawSmallString( tempx, y, "^8ZOMB", fade ); return; } CG_DrawSmallString( tempx, y, va( "%4i", score->ping ), fade ); tempx += INFO_LATENCY_WIDTH; (line 534) **** COMMENT OUT //forty - connecting players if ( score->ping == -1) { const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; s = CG_TranslateString( "^1CONNECTING" ); w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return; } //forty - zombied out players if ( score->ping == 999) { const char *s; int w, totalwidth; totalwidth = INFO_CLASS_WIDTH + INFO_SCORE_WIDTH + INFO_LATENCY_WIDTH - 8; s = CG_TranslateString( "^3ZOMBIE" ); w = CG_DrawStrlen( s ) * SMALLCHAR_WIDTH; CG_DrawSmallString( tempx + totalwidth - w, y, s, fade ); return; } (line 587) **** REPLACE CG_DrawStringExt( tempx, y, va( "%4i", score->ping ), hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); tempx += INFO_LATENCY_WIDTH; **** WITH // PatheticCockroach - connecting players if ( score->ping == -1) { CG_DrawSmallString( tempx, y, "^1CONN", fade ); return; } // PatheticCockroach - zombied out players if ( score->ping == 999) { CG_DrawSmallString( tempx, y, "^8ZOMB", fade ); return; } CG_DrawStringExt( tempx, y, va( "%4i", score->ping ), hcolor, qfalse, qfalse, MINICHAR_WIDTH, MINICHAR_HEIGHT, 0 ); tempx += INFO_LATENCY_WIDTH;