## 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_throwKnifeWait : How many milliseconds a player must wait between knife throws. default = 500 This modification changes the ETPub g_throwKnifeWait from a time in seconds to a time in milliseconds. It also removes the minimum value (200ms). To restore the default ETPub behavior, set it to 2000. ------------------------- MODIFICATION STARTS HERE src\game\g_weapon.c : (line 5190) **** REPLACE // gabriel: Set a minimum delay between throwing knife throws to avoid // players throwing a ton of knoves by binding throwknife to the mouse wheel // (same problem akimbo pistols had in previous versions of ET) effectiveThrowKnifeWait = g_throwKnifeWait.value * 1000; if (effectiveThrowKnifeWait < 200) // 200 ms is the same time between attacks as a non-throwing knife effectiveThrowKnifeWait = 200; if ( level.time - ent->client->pmext.knifeThrownTime < effectiveThrowKnifeWait ) { CPx(ent-g_entities, va("cp \"You must wait %.2f second%s " "between knife throws\n\"", (float)effectiveThrowKnifeWait / 1000, (effectiveThrowKnifeWait == 1000)?"":"s")); return; } **** WITH // gabriel: Set a minimum delay between throwing knife throws to avoid // players throwing a ton of knoves by binding throwknife to the mouse wheel // (same problem akimbo pistols had in previous versions of ET) effectiveThrowKnifeWait = g_throwKnifeWait.integer; if (effectiveThrowKnifeWait < 0) // 200 ms is the same time between attacks as a non-throwing knife effectiveThrowKnifeWait = 0; if ( level.time - ent->client->pmext.knifeThrownTime < effectiveThrowKnifeWait ) { CPx(ent-g_entities, va("cp \"You must wait %.2f second%s " "between knife throws\n\"", (float)effectiveThrowKnifeWait / 1000, (effectiveThrowKnifeWait == 1000)?"":"s")); return; }