## 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_adreselfCharge : Sets how many percents will be removed from the charge bar on performing an adre on self action. For instance 50 will remove half (50%) the charge bar when using adre on self. default : 80 (ET default is 100) ------------------------- MODIFICATION STARTS HERE src\game\bg_pmove.c : (line 14) **** BEFORE #include "bg_local.h" **** ADD #ifdef GAMEDLL #include "g_local.h" #endif (line 4173) **** REPLACE if( pm->ps->weapon == WP_MEDIC_ADRENALINE ) { if (pm->cmd.serverTime - pm->ps->classWeaponTime < pm->medicChargeTime) return; } **** WITH if( pm->ps->weapon == WP_MEDIC_ADRENALINE ) { if (pm->cmd.serverTime - pm->ps->classWeaponTime < pm->medicChargeTime*g_adreselfCharge.integer*0.01) return; } src\game\g_weapon.c : (line 4804) **** IN FireWeapon **** REPLACE case WP_MEDIC_ADRENALINE: ent->client->ps.classWeaponTime = level.time; **** WITH case WP_MEDIC_ADRENALINE: if (level.time - ent->client->ps.classWeaponTime > level.medicChargeTime[ent->client->sess.sessionTeam-1]) { ent->client->ps.classWeaponTime = level.time - level.medicChargeTime[ent->client->sess.sessionTeam-1]; } ent->client->ps.classWeaponTime += level.medicChargeTime[ent->client->sess.sessionTeam-1]*0.01*g_adreselfCharge.integer; src\game\g_local.h : (line 2154) **** AFTER extern vmCvar_t g_spawnInvul; **** ADD extern vmCvar_t g_adreselfCharge; src\game\g_main.c : (line 257) **** AFTER vmCvar_t g_spawnInvul; **** ADD vmCvar_t g_adreselfCharge; (line 755) **** AFTER { &g_spawnInvul, "g_spawnInvul", "3", 0 }, **** ADD { &g_adreselfCharge, "g_adreselfCharge", "80", 0 }, src\cgame\cg_local.h (line 2513) **** AFTER extern vmCvar_t g_medicMaxAmmo; **** ADD extern vmCvar_t g_adreselfCharge; src\cgame\cg_main.c (line 336) **** AFTER vmCvar_t g_medicMaxAmmo; **** ADD vmCvar_t g_adreselfCharge; (line 628) **** AFTER { &g_medicMaxAmmo, "g_medicMaxAmmo", "3", 0 }, **** ADD { &g_adreselfCharge, "g_adreselfCharge", "80", 0 }, ------------------------- PERSONAL NOTES g_weapon.c : FireWeapon Weapon_AdrenalineSyringe bg_pmove.c : static void PM_Weapon