## 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_adrenotherCharge : Sets how many percents will be removed from the charge bar on performing an adrenother action. For instance 50 will remove half (50%) the charge bar when using adrenother. default : 20 ------------------------- MODIFICATION STARTS HERE src\game\g_weapon.c : (line 5739) **** IN void G_AdrenOther( gentity_t *ent ) **** AFTER if (tr.fraction < 1.0) { traceEnt = &g_entities[ tr.entityNum ]; if (traceEnt->client != NULL && (traceEnt->client->sess.sessionTeam == ent->client->sess.sessionTeam) && (!(traceEnt->client->ps.pm_type == PM_DEAD)) ) { **** REPLACE ent->client->ps.classWeaponTime = level.time; **** WITH ent->client->ps.classWeaponTime += level.medicChargeTime[ent->client->sess.sessionTeam-1]*0.01*g_adrenotherCharge.integer; (a bit b4) **** REPLACE // check charge bar if (level.time - ent->client->ps.classWeaponTime < level.medicChargeTime[ent->client->sess.sessionTeam-1]) return; **** WITH // check charge bar 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]; } else if (level.time - ent->client->ps.classWeaponTime < level.medicChargeTime[ent->client->sess.sessionTeam-1]*0.01*g_adrenotherCharge.integer) return; src\game\g_local.h : (line 2154) **** AFTER extern vmCvar_t g_spawnInvul; **** ADD extern vmCvar_t g_adrenotherCharge; src\game\g_main.c : (line 257) **** AFTER vmCvar_t g_spawnInvul; **** ADD vmCvar_t g_adrenotherCharge; (line 755) **** AFTER { &g_spawnInvul, "g_spawnInvul", "3", 0 }, **** ADD { &g_adrenotherCharge, "g_adrenotherCharge", "20", 0 }, ------------------------- PERSONAL NOTES g_weapon.c : == dans Weapon_Medic_Ext == voir : if( ent->client->sess.skill[SK_FIRST_AID] >= 2 ) { ent->client->ps.classWeaponTime += level.medicChargeTime[ent->client->sess.sessionTeam-1]*0.15; } else { ent->client->ps.classWeaponTime += level.medicChargeTime[ent->client->sess.sessionTeam-1]*0.25; }