## 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) Darwin award and Isaac Newton Award ------------------------- MODIFICATION STARTS HERE src\cgame\cg_local.h (line 1981) **** REPLACE #define NUM_ENDGAME_AWARDS 15 **** WITH #define NUM_ENDGAME_AWARDS 17 src\cgame\cg_debriefing.c (line 2809) **** AFTER "Arti Spammer", // min 10 arti strikes **** ADD "Darwin Award", // "Isaac Newton Award", // src\game\g_local.h (line 645) **** BEFORE int arti_fired; **** ADD int darwin_award; int newton_award; src\game\g_combat.c (line 953) **** AFTER // forty - #608 - reset the last fear time so players who // are already dead from other means don't get fearkilled. self->client->lasthurt_time=0; self->client->lasthurt_client=ENTITYNUM_NONE; self->client->lasthurt_mod=0; **** ADD // PatheticCockroach - Darwin and Newton Awards if(g_gamestate.integer == GS_PLAYING && meansOfDeath != MOD_SUICIDE && meansOfDeath != MOD_SWITCHTEAM) { if(meansOfDeath == MOD_FALLING || meansOfDeath == MOD_CRUSH || meansOfDeath == MOD_WATER || meansOfDeath == MOD_SLIME || meansOfDeath == MOD_CRUSH_CONSTRUCTIONDEATH_NOATTACKER || meansOfDeath == MOD_LAVA || attacker == self) { self->client->sess.darwin_award++; } if(meansOfDeath == MOD_FALLING) self->client->sess.newton_award++; } src\game\g_stats.c (line 1110) **** AFTER CHECKSTATMIN( sess.arti_fired, 10 ); **** ADD CHECKSTAT1( sess.darwin_award ); CHECKSTAT1( sess.newton_award ); ------------------------- PERSONAL NOTES void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int meansOfDeath ) { // end kill streaks on team switch or suicide only if we are supposed to if (((meansOfDeath == MOD_SUICIDE) && (g_spreeOptions.integer & SPREE_SUICIDE_ENDS)) || ((meansOfDeath == MOD_SWITCHTEAM) && (g_spreeOptions.integer & SPREE_TEAMCHANGE_ENDS)) || ((meansOfDeath != MOD_SUICIDE) && (meansOfDeath != MOD_SWITCHTEAM))) G_KillSpree(self, attacker); if(attacker == self) { if(self->client) { self->client->pers.playerStats.suicides++; trap_PbStat ( self - g_entities , "suicide" , va("%d %d %d", self->client->sess.sessionTeam, self->client->sess.playerType, weap)) ; } } // check for single client messages switch( mod ) { case MOD_SUICIDE: message = "committed suicide"; break; case MOD_FALLING: message = "fell to his death"; break; case MOD_CRUSH: message = "was crushed"; break; case MOD_WATER: message = "drowned"; break; case MOD_SLIME: message = "died by toxic materials"; break; case MOD_TRIGGER_HURT: case MOD_TELEFRAG: // rain - added TELEFRAG and TARGET_LASER, just in case case MOD_TARGET_LASER: message = "was killed"; break; case MOD_CRUSH_CONSTRUCTIONDEATH_NOATTACKER: message = "got buried under a pile of rubble"; break; case MOD_LAVA: // rain message = "was incinerated"; break; default: message = NULL; break; }