## 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) g_truePing : bitflag : 1 - use ETPub's true pings 2 - fake pings (flag 1 has priority over it) still looking quite realistic for players (NOT for LAN players) 4 - fake pings (flag 2 has priority over it) even for very high pings (NOT for LAN players) 8 - fake pings for bots 16 - show bots as bots (flag 8 has priority over it) 32 - fake ping for LAN players (make them look like remote players) ------------------------- MODIFICATION STARTS HERE src\game\g_local.h : (line 3484) **** REPLACE // g_truePing #define TRUEPING_TRUE 1 #define TRUEPING_FAKE 2 #define TRUEPING_ALLFAKE 3 #define TRUEPING_HIDEBOTS 4 **** WITH // g_truePing #define TRUEPING_TRUE 1 #define TRUEPING_FAKE 2 #define TRUEPING_VERYFAKE 4 #define TRUEPING_HIDEBOTS 8 #define TRUEPING_SHOWBOTS 16 #define TRUEPING_HIDELAN 32 src\game\g_active.c : (line 1346) **** REPLACE // initialize the real ping if ( g_truePing.integer == TRUEPING_TRUE ) { int i, sum = 0; // get an average of the samples we saved up for ( i = 0; i < NUM_PING_SAMPLES; i++ ) { sum += client->pers.pingsamples[i]; } client->pers.realPing = sum / NUM_PING_SAMPLES; } else if ( g_truePing.integer == TRUEPING_FAKE ) { // a fake ping looking good if((client->ps.ping > 50) && (client->ps.ping < 350)) client->pers.realPing = 48+(random()*4)+((client->ps.ping)-50)/3; else if (client->ps.ping<2) client->pers.realPing = 48+(random()*33); else client->pers.realPing = client->ps.ping; } else if ( g_truePing.integer == TRUEPING_ALLFAKE ) { // a really, really fake ping if(client->ps.ping > 2) client->pers.realPing = 48+(random()*6)+((client->ps.ping)-50)/3; else client->pers.realPing = 48+(random()*33); } else if ( g_truePing.integer == TRUEPING_HIDEBOTS ) { // just hide the pings of bots if(client->ps.ping > 2) client->pers.realPing = client->ps.ping; else client->pers.realPing = 48+(random()*33); } else { // if g_truePing is off, use the normal ping client->pers.realPing = client->ps.ping; } //unlagged - true ping **** WITH // initialize the real ping // if g_truePing is off, use the normal ping client->pers.realPing = client->ps.ping; if (!(ent->r.svFlags & SVF_BOT)) { if ( g_truePing.integer & TRUEPING_TRUE ) { int i, sum = 0; // get an average of the samples we saved up for ( i = 0; i < NUM_PING_SAMPLES; i++ ) { sum += client->pers.pingsamples[i]; } client->pers.realPing = sum / NUM_PING_SAMPLES; } else if ( g_truePing.integer & TRUEPING_FAKE ) { // a fake ping looking good, for non-LAN players only if((client->ps.ping > 50) && (client->ps.ping < 350)) client->pers.realPing = 48+(random()*4)+((client->ps.ping)-50)/3; } else if ( (g_truePing.integer & TRUEPING_VERYFAKE) && (client->ps.ping >= 10) ) { // a really, really fake ping, for non-LAN players only client->pers.realPing = 48+(random()*6)+((client->ps.ping)-50)/3; } if ( (g_truePing.integer & TRUEPING_HIDELAN) && (client->ps.ping < 10) ) { // fake ping just for players on LAN (ping < 10) client->pers.realPing = 48+(random()*33); } } else { if ( g_truePing.integer & TRUEPING_HIDEBOTS ) client->pers.realPing = 48+(random()*33); else if ( g_truePing.integer & TRUEPING_SHOWBOTS ) client->pers.realPing = 998; // 998 ping must then be displayed as "BOT" } //unlagged - true ping src\cgame\cg_scoreboard.c (line 380 and line 605) **** AFTER // PatheticCockroach - zombied out players if ( score->ping == 999) { CG_DrawSmallString( tempx, y, "^8ZOMB", fade ); return; } **** ADD // PatheticCockroach - show the bots if ( score->ping == 998) { CG_DrawSmallString( tempx, y, "^9BOT", fade ); return; } ------------------------- PERSONAL NOTES ent->r.svFlags & SVF_BOT