## 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 : # Allows players to see the true amount of time it takes until their actions are processed on the server. # Pings will show around 50 ms higher than normal, but it's more accurate. Shows in the scoreboard. # default : 0 # (See http://etpub.org/ETPubServerDocs.html#g_truePing) This modification adds an option that lies about ping. To enable it, set g_truePing to 2. 3 lies even more. 4 lies only about bot pings. ------------------------- MODIFICATION STARTS HERE src\game\g_local.h : (line 3421) **** AFTER #define REFLECT_FF_LANDMINES 512 **** ADD // g_truePing #define TRUEPING_TRUE 1 #define TRUEPING_FAKE 2 #define TRUEPING_ALLFAKE 3 #define TRUEPING_HIDEBOTS 4 src\game\g_active.c : (line 1289) **** REPLACE // initialize the real ping if ( g_truePing.integer ) { int i, sum = 0; **** WITH // initialize the real ping if ( g_truePing.integer == TRUEPING_TRUE ) { int i, sum = 0; (a bit after) **** AFTER client->pers.realPing = sum / NUM_PING_SAMPLES; } **** ADD 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); }