## 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_fopsAmmoRegen : The rate at which filed ops regenerate ammo (in bullet per second). default : 1 ------------------------- MODIFICATION STARTS HERE src\game\g_active.c : (line 845) **** BEFORE if(client->pmext.poisoned && ent->health > 0 && g_poison.integer) { **** ADD // Field ops regenerate ammo if(client->sess.playerType == PC_FIELDOPS && !(client->ps.eFlags & EF_DEAD) && g_fopsAmmoRegen.integer>0) { if(client->sess.sessionTeam == TEAM_ALLIES){ Add_Ammo(ent, WP_THOMPSON, g_fopsAmmoRegen.integer, qfalse); //Add_Ammo(ent, WP_AKIMBO_COLT, g_fopsAmmoRegen.integer, qfalse); } else if(client->sess.sessionTeam == TEAM_AXIS){ Add_Ammo(ent, WP_MP40, g_fopsAmmoRegen.integer, qfalse); //Add_Ammo(ent, WP_AKIMBO_LUGER, g_fopsAmmoRegen.integer, qfalse); } } src\game\g_local.h : (line 2154) **** AFTER extern vmCvar_t g_spawnInvul; **** ADD extern vmCvar_t g_fopsAmmoRegen; src\game\g_main.c : (line 257) **** AFTER vmCvar_t g_spawnInvul; **** ADD vmCvar_t g_fopsAmmoRegen; (line 755) **** AFTER { &g_spawnInvul, "g_spawnInvul", "3", 0 }, **** ADD { &g_fopsAmmoRegen, "g_fopsAmmoRegen", "1", 0 }, ------------------------- PERSONAL NOTES src\game\g_active.c ClientTimerActions() client->sess.playerType == PC_MEDIC sess.playerType == PC_FIELDOPS case PC_FIELDOPS: if( skills[SK_SIGNALS] >= 1 ) { return 2; g_client.c AddExtraSpawnAmmo AddWeaponToPlayer G_AddClassSpecificTools _SetFieldOpSpawnWeapons case WP_LUGER: case WP_COLT: case WP_MP40: case WP_THOMPSON: if( (client->sess.skill[SK_FIRST_AID] >= 1 && client->sess.playerType == PC_MEDIC) || client->sess.skill[SK_LIGHT_WEAPONS] >= 1 ) { client->ps.ammo[BG_FindAmmoForWeapon(weaponNum)] += GetAmmoTableData(weaponNum)->maxclip; } break; g_items.c int Add_Ammo(gentity_t *ent, int weapon, int count, qboolean fillClip) { if( client->sess.sessionTeam != TEAM_ALLIES && client->sess.sessionTeam != TEAM_AXIS ) { return WP_NONE; } g_cmds.c Add_Ammo(ent, i, 9999, qtrue);