## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 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) !heal didn't work on self and would make objective vanish if healing the carrier... now this is fixed ------------------------- MODIFICATION STARTS HERE src\game\g_shrubbot.c (line 2610) **** NEW HEAL FUNCTION qboolean G_shrubbot_heal(gentity_t *ent, int skiparg) { int pids[MAX_CLIENTS]; char name[MAX_NAME_LENGTH], err[MAX_STRING_CHARS]; gentity_t *vic; if(Q_SayArgc() < 2+skiparg) { if(!ent) { SPC("heal: you are on the console"); return qfalse; } vic=ent; } else { Q_SayArgv(1+skiparg, name, sizeof(name)); if(ClientNumbersFromString(name, pids) != 1) { G_MatchOnePlayer(pids, err, sizeof(err)); SP(va("^/heal: ^7%s\n", err)); return qfalse; } vic = &g_entities[pids[0]]; } if(!_shrubbot_admin_higher(ent, &g_entities[pids[0]])) { SP("^/heal: ^7sorry, but your intended victim has a higher admin" " level than you do.\n"); return qfalse; } if(!(vic->client->sess.sessionTeam == TEAM_AXIS || vic->client->sess.sessionTeam == TEAM_ALLIES)) { SP("^/heal: ^7player must be on a team to be healed\n"); return qfalse; } if( !(vic->client->ps.powerups[PW_REDFLAG] || vic->client->ps.powerups[PW_REDFLAG]) && vic->health<=0 ) ReviveEntity(vic , vic); vic->health = vic->client->ps.stats[STAT_MAX_HEALTH]; AP(va("chat \"^/heal: ^7%s ^7got healed\" -1", vic->client->pers.netname)); return qtrue; }