From c3ccddb39fe61a3667831bf0906c95f390344a9a Mon Sep 17 00:00:00 2001 From: Adam Olsen Date: Mon, 1 Oct 2001 11:37:02 +0000 Subject: [PATCH] - BUGS - make soldiers sometimes retreat when low on health - make "static" mode soldiers work. more or less. - Massive cleanup of obituary.qc. I'd be surprised if there isn't a bug or two. --- BUGS | 1 + army.qc | 4 +- custom.qc | 21 +- defs.qh | 3 + grunty.qc | 97 +- menu.qc | 2 - obituary.qc | 3356 +++++++++++++++++++++++---------------------------- ofndefs.qh | 8 +- often.qc | 32 +- weapons.qc | 19 +- 10 files changed, 1654 insertions(+), 1889 deletions(-) diff --git a/BUGS b/BUGS index b6b17f9..b7855f5 100644 --- a/BUGS +++ b/BUGS @@ -15,3 +15,4 @@ - sentries/teslas should check their pointcontents every frame, and blow up if they're out of the map - topcolor gets reset every time you respawn (?), even though it shouldn't be. ditto for skin? - prematch shouldn't force autoteam when it's done +- sometimes ID doesn't work. this may be because impulses are unreliable though :/ diff --git a/army.qc b/army.qc index cf457ce..73e62f5 100644 --- a/army.qc +++ b/army.qc @@ -217,11 +217,11 @@ void() Menu_Army2 = if (self.demon_one.army_ready == 0) st += "\\n"; else if (self.demon_one.army_ready == 1) - st += "\\n"; + st += "\\n"; else if (self.demon_one.army_ready == 2) st += "\\n"; else if (self.demon_one.army_ready == 3) - st += "\\n"; + st += "\\n"; } st += "\x98.. Reports: "; diff --git a/custom.qc b/custom.qc index 8b5c172..c8c2fea 100644 --- a/custom.qc +++ b/custom.qc @@ -74,20 +74,17 @@ float(float targteam, float attackteam) Teammate = { local float teammask; - if ( !teamplay ) return FALSE; - if ( !targteam ) return FALSE; - if ( targteam == attackteam ) return TRUE; - if ( number_of_teams < 3 ) return FALSE; + if (!teamplay) return FALSE; + if (!targteam) return FALSE; + if (targteam == attackteam) return TRUE; + if (number_of_teams < 3) return FALSE; - if ( targteam == 1 ) teammask = 1; - else if ( targteam == 2 ) teammask = 2; - else if ( targteam == 3 ) teammask = 4; - else if ( targteam == 4 ) teammask = 8; + teammask = 1 << (targteam - 1); - if ( attackteam == 1 && (friends1_mask & teammask)) return TRUE; - else if ( attackteam == 2 && (friends2_mask & teammask)) return TRUE; - else if ( attackteam == 3 && (friends3_mask & teammask)) return TRUE; - else if ( attackteam == 4 && (friends4_mask & teammask)) return TRUE; + if (attackteam == 1 && (friends1_mask & teammask)) return TRUE; + else if (attackteam == 2 && (friends2_mask & teammask)) return TRUE; + else if (attackteam == 3 && (friends3_mask & teammask)) return TRUE; + else if (attackteam == 4 && (friends4_mask & teammask)) return TRUE; return FALSE; }; diff --git a/defs.qh b/defs.qh index e296f2a..5976270 100644 --- a/defs.qh +++ b/defs.qh @@ -1320,3 +1320,6 @@ #include "ofndefs.qh" #define AVG(a,b) (((a) + (b)) * 0.5) +#define MIN(a,b) (((a) < (b)) ? (a) : (b)) +#define MAX(a,b) (((a) > (b)) ? (a) : (b)) +#define BOUND(a,b,c) (MAX((a), MIN((b), (c)))) diff --git a/grunty.qc b/grunty.qc index fcb31e6..9716e19 100644 --- a/grunty.qc +++ b/grunty.qc @@ -21,6 +21,15 @@ */ +#define ARMY_RANGE_NONE_MIN 0 +#define ARMY_RANGE_NONE_MAX 0 +#define ARMY_RANGE_SMALL_MIN 75 +#define ARMY_RANGE_SMALL_MAX 100 +#define ARMY_RANGE_MEDIUM_MIN 175 +#define ARMY_RANGE_MEDIUM_MAX 200 +#define ARMY_RANGE_LONG_MIN 250 +#define ARMY_RANGE_LONG_MAX 275 + // Function Prototypes // Whenever a function is added within the grunty, add it up here @@ -218,8 +227,7 @@ void() grunty_run = if (self.super_time <= time) { sprint(self.real_owner, PRINT_HIGH, "Hello, commander! I am currently running at speed "); - st = ftos(self.custom_speed); - sprint(self.real_owner, PRINT_HIGH, st); + sprint(self.real_owner, PRINT_HIGH, ftos(self.custom_speed)); sprint(self.real_owner, PRINT_HIGH, " towards "); sprint(self.real_owner, PRINT_HIGH, self.goalentity.netname); sprint(self.real_owner, PRINT_HIGH, "\n"); @@ -961,6 +969,7 @@ void() GruntyCheckFire = // RPrint("NONE\n"); } }; +float statehack; void() GRun = { @@ -1011,8 +1020,14 @@ void() GRun = /* - OfN -if (self.enemy.classname == "monster_shambler" || self.enemy.weapons_carried & WEAP_ASSAULT_CANNON) if (self.has_teleporter == 0) self.has_teleporter = 3;*/ + + // 0% > 75% health, 50% < 25% health, range in between + local float chance = (BOUND (0.5, 1 - (self.health / self.max_health), 0.75) - 0.50) / 8; +// dprint ("retreat chance: " + ftos (chance) + "\n"); + if (random () < chance) + self.has_teleporter = 3; // we're getting wasted, better retreat - if (random() < 0.02) // to prevent us from strafing or whatever forever. + if (random () < 0.02) // to prevent us from strafing or whatever forever. self.has_teleporter = 0; // Test to see if we want to do an evasive maneuver @@ -1042,22 +1057,70 @@ void() GRun = { self.has_teleporter = 0; botmovedist(vectoyaw(v_forward), dist); // move - return; } + else + { + if (self.is_malfunctioning == 2 && self.enemy != world) { + local float dist = vlen (self.origin - self.enemy.origin); + local float desired_min, desired_max; - botmovedist(vectoyaw(v_forward), dist); // move - if (random() * 20 < 1 && self.enemy != world) // if we get a score - { // of one on a d20, - local float r; // special - r = random(); - if (r < 0.25) - self.has_teleporter = -1; // left - else if (r < 0.5) - self.has_teleporter = 1; // right - else if (r < 0.75) - self.has_teleporter = 2; // jump! - else - self.has_teleporter = 3; // italian style! + if (self.army_ready == 0) { + desired_min = ARMY_RANGE_NONE_MIN; + desired_max = ARMY_RANGE_NONE_MAX; + } else if (self.army_ready == 1) { + desired_min = ARMY_RANGE_SMALL_MIN; + desired_max = ARMY_RANGE_SMALL_MAX; + } else if (self.army_ready == 2) { + desired_min = ARMY_RANGE_MEDIUM_MIN; + desired_max = ARMY_RANGE_MEDIUM_MAX; + } else { // if (self.army_ready == 3) + desired_min = ARMY_RANGE_LONG_MIN; + desired_max = ARMY_RANGE_LONG_MAX; + } + + local string diststring = "dist: " + ftos (dist) + + " min: " + ftos (desired_min) + + " max: " + ftos (desired_max) + + " action: "; + if (dist < desired_min) { + if (statehack != -1) { +// dprint ("me: " + vtos (self.origin) + " goal: " + vtos (self.goalentity.origin) + "\n"); + dprint (diststring + "back off\n"); + statehack = -1; + } + botmovedist (vectoyaw (v_forward), dist * -0.1); // back off + } else if (dist > desired_max) { + if (statehack != 1) { +// dprint ("me: " + vtos (self.origin) + " goal: " + vtos (self.goalentity.origin) + "\n"); + dprint (diststring + "close in\n"); + statehack = 1; + } + botmovedist (vectoyaw (v_forward), dist); // close in + } else { + if (statehack != 0) { +// dprint ("me: " + vtos (self.origin) + " goal: " + vtos (self.goalentity.origin) + "\n"); + dprint (diststring + "do nothing *cough*\n"); + statehack = 0; + } + if (random () < 0.1) + botmovedist (vectoyaw (v_forward), dist); + } + } else + botmovedist(vectoyaw(v_forward), dist); // move + + if (random() < 0.05 && self.enemy != world) // if we get a score + { // of one on a d20, + local float r; // special + r = random(); + if (r < 0.25) + self.has_teleporter = -1; // left + else if (r < 0.5) + self.has_teleporter = 1; // right + else if (r < 0.75) + self.has_teleporter = 2; // jump! + else + self.has_teleporter = 3; // italian style! + } } } }; diff --git a/menu.qc b/menu.qc index 2c46f57..1023b5e 100644 --- a/menu.qc +++ b/menu.qc @@ -150,8 +150,6 @@ void(entity inflictor, entity attacker, float damage, entity ignore) T_RadiusDam void(entity bastard,float threshold) createBastard; //CY Tinker void() DoTinker; -//WW Needed for the Dismantling -void(entity targ, entity attacker) ClientObituary; // WK -------------- diff --git a/obituary.qc b/obituary.qc index 29b2670..b46ebac 100644 --- a/obituary.qc +++ b/obituary.qc @@ -1,50 +1,93 @@ #include "defs.qh" +// This makes the chances of each death message easier to understand. I hope. +#define FRAC(x, y) ((x) * 1.0 / (y)) + +void (entity targ, entity attacker) Obit_Player; +void (entity targ, entity attacker) Obit_Monster; +void (entity targ, entity attacker) Obit_Monster_Wizard; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Tesla; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Sentry; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Player; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Army; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Demon1; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Shambler; +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Wizard; +void (entity targ, entity attacker) Obit_Monster_Demon1; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Tesla; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Sentry; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Player; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Army; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Demon1; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Shambler; +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Wizard; +void (entity targ, entity attacker) Obit_Monster_Army; +void (entity targ, entity attacker) Obit_Monster_Army_by_Tesla; +void (entity targ, entity attacker) Obit_Monster_Army_by_Sentry; +void (entity targ, entity attacker) Obit_Monster_Army_by_Player; +void (entity targ, entity attacker) Obit_Monster_Army_by_Shambler; +void (entity targ, entity attacker) Obit_Monster_Army_by_Demon1; +void (entity targ, entity attacker) Obit_Monster_Army_by_Army; +void (entity targ, entity attacker) Obit_Monster_Army_by_Wizard; +void (entity targ, entity attacker) Obit_Monster_Shambler; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Tesla; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Sentry; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Player; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Demon1; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Shambler; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Army; +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Wizard; +void (entity targ, entity attacker) Obit_Monster_Misc; +void (entity targ, entity attacker) Obit_Building; +void (entity targ, entity attacker) Obit_Building_by_Tesla; +void (entity targ, entity attacker) Obit_Building_by_Self; +void (entity targ, entity attacker) Obit_Building_by_Teledeath; +void (entity targ, entity attacker) Obit_Building_by_Player; +void (entity targ, entity attacker) Obit_Building_by_Army; + + /* =========== ClientObituary - + called when a player dies ============ */ -void(entity targ, entity attacker) ClientObituary = +void (entity targ, entity attacker) ClientObituary = { - local float rnum; - local string deathstring, deathstring2; - - // FIXME: - - //- OfN - Unidentified kill ---------// - deathstring=" is killed by "; - deathstring2="\n"; - // I still have no idea when this is used - //-----------------------------------// - if (prematch >= time) return; - - rnum = random(); + if (targ.classname == "player") + Obit_Player (targ, attacker); + else if (IsMonster (targ)) + Obit_Monster (targ, attacker); + else if (IsBuilding (targ) && targ.classname != "building_sentrygun_base") + Obit_Building (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Player = +{ if (targ.classname == "player") { //WK No Obituary for the cursed! if (targ.penance_time > time - 1) { - Give_Frags_Out(targ, targ, -1, 0, 1, 1, 0); + Give_Frags_Out (targ, targ, -1, 0, 1, 1, 0); /* targ.real_frags = targ.real_frags - 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) targ.frags = targ.real_frags; */ return; } - + if (targ.martyr_enemy != targ) deathmsg = targ.stored_deathmsg; - if (deathmsg==DMSG_CYBERNET) + if (deathmsg == DMSG_CYBERNET) { - //local string tst; - //tst=GetBuildingName(attacker); - + //local string tst; + //tst = GetBuildingName (attacker); + //if (rnum < 0.5) //{ bprint (PRINT_MEDIUM, targ.netname); @@ -73,17 +116,16 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, "\n"); }*/ - Give_Frags_Out(targ, targ, -1, 0, 1, 1, 0); + Give_Frags_Out (targ, targ, -1, 0, 1, 1, 0); return; } - - if (deathmsg==DMSG_ANTIHACK) + + if (deathmsg == DMSG_ANTIHACK) { - local string tst; - tst=GetBuildingName(attacker); - - if (rnum < 0.5) + local string tst = GetBuildingName (attacker); + + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is electrocuted trying to hack "); @@ -102,18 +144,17 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, "\n"); } - Give_Frags_Out(targ, targ, -1, 0, 1, 1, 0); + Give_Frags_Out (targ, targ, -1, 0, 1, 1, 0); return; } - if (deathmsg==DMSG_ANTIDISM) + if (deathmsg == DMSG_ANTIDISM) { - local string tst; - tst=GetBuildingName(attacker); + local string tst = GetBuildingName (attacker); - if (rnum < 0.5) + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " tries to dismantle "); @@ -132,7 +173,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, "\n"); } - Give_Frags_Out(targ, targ, -1, 0, 1, 1, 0); + Give_Frags_Out (targ, targ, -1, 0, 1, 1, 0); return; } @@ -140,34 +181,32 @@ void(entity targ, entity attacker) ClientObituary = //- OfN - Wizard death stuff if (attacker.classname == "monster_wizard") { - custom_demon_name(attacker); //CH + custom_demon_name (attacker); //CH //If our own demon killed us, kill demon and cost 2 frags if (attacker.real_owner == targ) { - Give_Frags_Out(attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); - + Give_Frags_Out (attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); + bprint (PRINT_MEDIUM, "The scrag "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " kills his owner, "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "\n"); - //kill_my_demon(); //Demon dies too + //kill_my_demon (); //Demon dies too return; - } - else if ((!Teammate(targ.team_no,attacker.real_owner.team_no)) || attacker.real_owner.team_no < 1) + } + else if ((!Teammate (targ.team_no, attacker.real_owner.team_no)) || attacker.real_owner.team_no < 1) { - if ( rnum > 0.6) - { + local float rnum = random (); + if (rnum < FRAC (1, 3)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " was nullified by the scrag "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum > 0.3) - { + } else if (rnum < FRAC (2, 3)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " didn't survive "); bprint (PRINT_MEDIUM, attacker.netname); @@ -175,25 +214,22 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ") acid\n"); - } - else - { + } else { bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s scrag, "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, ", removes "); bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, "\n"); - } + bprint (PRINT_MEDIUM, "\n"); + } - Give_Frags_Out(attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); return; } - else if (Teammate(targ.team_no,attacker.real_owner.team_no)) + else if (Teammate (targ.team_no, attacker.real_owner.team_no)) { - if (rnum < 0.5) - { + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, "The supposed friendly scrag "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); @@ -202,9 +238,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " killed "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "\n"); - } - else - { + } else { //bprint (PRINT_MEDIUM, ""); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); @@ -213,20 +247,20 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "'s help\n"); } - //Give_Frags_Out(attacker.real_owner, attacker.real_owner, -1, 0, 1, 1, 0); + //Give_Frags_Out (attacker.real_owner, attacker.real_owner, -1, 0, 1, 1, 0); return; } - } + } //WK if (attacker.classname == "monster_demon1") { - custom_demon_name(attacker); //CH + custom_demon_name (attacker); //CH //If our own demon killed us, kill demon and cost 2 frags if (attacker.real_owner == targ) { - Give_Frags_Out(attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); /* attacker.real_owner.real_frags = attacker.real_owner.real_frags - 2; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -241,13 +275,12 @@ void(entity targ, entity attacker) ClientObituary = } else { - if (rnum < 0.5) { + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " exacts revenge on its summoner, "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "\n"); - } - else { + } else { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is dragged into the pit by his own demon, "); bprint (PRINT_MEDIUM, attacker.netname); @@ -255,36 +288,34 @@ void(entity targ, entity attacker) ClientObituary = } } - //kill_my_demon(); //Demon dies too + //kill_my_demon (); //Demon dies too return; } if (deathmsg == DMSG_DEMON_FIRE) { - if (rnum < 0.2) { + local float rnum = random (); + if (rnum < FRAC (1, 4)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " was burned alive by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum < 0.5) { + } else if (rnum < FRAC (2, 4)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " thought he was safe from "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum < 0.75) { + } else if (rnum < FRAC (3, 4)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " died from "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, "'s ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ") fire balls\n"); - } - else { + } else { bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s demon, "); bprint (PRINT_MEDIUM, attacker.netname); @@ -295,27 +326,26 @@ void(entity targ, entity attacker) ClientObituary = } else { - if (rnum < 0.1) { + local float rnum = random (); + if (rnum < FRAC (2, 20)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " was eviscerated by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum < 0.50) { + } else if (rnum < FRAC (10, 20)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " was ripped limb from limb by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else { + } else { bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s demon, "); bprint (PRINT_MEDIUM, attacker.netname); - if (rnum < 0.75) + if (rnum < FRAC (15, 20)) bprint (PRINT_MEDIUM, ", claws apart "); else bprint (PRINT_MEDIUM, ", rends apart "); @@ -324,8 +354,8 @@ void(entity targ, entity attacker) ClientObituary = } } - if (!Teammate(targ.team_no,attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) - Give_Frags_Out(attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); + if (!Teammate (targ.team_no, attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) + Give_Frags_Out (attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); /* attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -338,12 +368,12 @@ void(entity targ, entity attacker) ClientObituary = if (attacker.classname == "monster_army") //SB-1 Tech - Share and Enjoy! { - custom_demon_name(attacker); //CH - GetRank(attacker); // Sponsored by SB-1 Tech + custom_demon_name (attacker); //CH + GetRank (attacker); // Sponsored by SB-1 Tech //If our own demon killed us, kill demon and cost 2 frags if (attacker.real_owner == targ) { - Give_Frags_Out(attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); /* attacker.real_owner.real_frags = attacker.real_owner.real_frags - 2; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -367,30 +397,22 @@ void(entity targ, entity attacker) ClientObituary = //} return; } - - if (Teammate(targ.team_no, attacker.real_owner.team_no)) + + if (Teammate (targ.team_no, attacker.real_owner.team_no)) { + local float rnum = random (); bprint (PRINT_MEDIUM, attacker.undercover_name); - if (rnum < 0.25) - { - bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, attacker.netname); + + if (rnum < FRAC (1, 4)) bprint (PRINT_MEDIUM, " mows down a teammate\n"); - } - else if (rnum < 0.50) - { - bprint (PRINT_MEDIUM, attacker.netname); + else if (rnum < FRAC (2, 4)) bprint (PRINT_MEDIUM, " checks his glasses\n"); - } - else if (rnum < 0.75) - { - bprint (PRINT_MEDIUM, attacker.netname); + else if (rnum < FRAC (3, 4)) bprint (PRINT_MEDIUM, " gets a frag for the other team\n"); - } else - { - bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " loses another friend\n"); - } + return; } if (deathmsg == DMSG_AXE) @@ -464,11 +486,11 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ") buckshot\n"); } - - if (!Teammate(targ.team_no,attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) + + if (!Teammate (targ.team_no, attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) { - Give_Frags_Out(attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); - Give_Frags_Out(attacker, attacker, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker, attacker, 1, 0, 1, 1, 0); } /* attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -479,10 +501,10 @@ void(entity targ, entity attacker) ClientObituary = if (attacker.classname == "monster_shambler") { - custom_demon_name(attacker); //CH + custom_demon_name (attacker); //CH //If our own demon killed us, kill demon and cost 2 frags if (attacker.real_owner == targ) { - Give_Frags_Out(attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker.real_owner, -2, 0, 1, 1, 0); /* attacker.real_owner.real_frags = attacker.real_owner.real_frags - 2; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -504,13 +526,12 @@ void(entity targ, entity attacker) ClientObituary = } else { - if (rnum < 0.5) { + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " gets sick of its owner "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "\n"); - } - else { + } else { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " screams as "); bprint (PRINT_MEDIUM, attacker.netname); @@ -518,36 +539,34 @@ void(entity targ, entity attacker) ClientObituary = } } - //kill_my_demon(); //Demon dies too - OfN nope! + //kill_my_demon (); //Demon dies too - OfN nope! return; } if (deathmsg == DMSG_LIGHTNING) { - if (rnum < 0.2) { + local float rnum = random (); + if (rnum < FRAC (4, 20)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "'s body crackles with electricity as "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ") claims another victim\n"); - } - else if (rnum < 0.5) { + } else if (rnum < FRAC (10, 20)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " meets a bolt of lightning directed by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum < 0.75) { + } else if (rnum < FRAC (15, 20)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "'s goose is cooked by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, "'s ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ") lightning\n"); - } - else { + } else { bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s shambler, "); bprint (PRINT_MEDIUM, attacker.netname); @@ -558,17 +577,14 @@ void(entity targ, entity attacker) ClientObituary = } else if (deathmsg == DMSG_DEMON_FIRE) { - if (rnum < 0.5) - { + if (random () < FRAC (1, 2)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is obliterated by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")'s fireball\n"); - } - else - { + } else { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is turned into little "); bprint (PRINT_MEDIUM, targ.netname); @@ -581,36 +597,33 @@ void(entity targ, entity attacker) ClientObituary = } else { - if (rnum < 0.02) - { + local float rnum = random (); + if (rnum < FRAC (2, 100)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " screams as "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")'s claws slash down\n"); - } - else if (rnum < 0.1) { + } else if (rnum < FRAC (10, 100)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " was torn asunder by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else if (rnum < 0.50) { + } else if (rnum < FRAC (50, 100)) { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is smashed into next week by "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " ("); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, ")\n"); - } - else { + } else { bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s shambler, "); bprint (PRINT_MEDIUM, attacker.netname); - if (rnum < 0.75) + if (rnum < FRAC (75, 100)) bprint (PRINT_MEDIUM, ", tears "); else bprint (PRINT_MEDIUM, ", rips "); @@ -619,8 +632,8 @@ void(entity targ, entity attacker) ClientObituary = } } - if (!Teammate(targ.team_no,attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) - Give_Frags_Out(attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); + if (!Teammate (targ.team_no, attacker.real_owner.team_no) || attacker.real_owner.team_no < 1) + Give_Frags_Out (attacker.real_owner, attacker.real_owner, 1, 0, 1, 1, 0); /* attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -628,7 +641,7 @@ void(entity targ, entity attacker) ClientObituary = */ return; } - + if (attacker.classname == "teledeath") { bprint (PRINT_MEDIUM, targ.netname); @@ -636,8 +649,8 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, attacker.owner.netname); bprint (PRINT_MEDIUM, "\n"); - if (!Teammate(targ.team_no,attacker.owner.team_no) || attacker.owner.team_no < 1) - Give_Frags_Out(attacker.owner, attacker.owner, 1, 0, 1, 1, 0); + if (!Teammate (targ.team_no, attacker.owner.team_no) || attacker.owner.team_no < 1) + Give_Frags_Out (attacker.owner, attacker.owner, 1, 0, 1, 1, 0); /* attacker.owner.real_frags = attacker.owner.real_frags + 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -652,12 +665,12 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "'s telefrag\n"); - Give_Frags_Out(targ, targ, -1, 1, 1, 1, 0); + Give_Frags_Out (targ, targ, -1, 1, 1, 1, 0); /* targ.real_frags = targ.real_frags - 1; if (!(toggleflags & TFLAG_TEAMFRAGS)) targ.frags = targ.real_frags; - + logfrag (targ, targ); */ return; @@ -679,8 +692,10 @@ void(entity targ, entity attacker) ClientObituary = { if (targ == attacker) { + local string deathstring; + // killed self - Give_Frags_Out(attacker, attacker, -1, 0, 1, 1, 1); + Give_Frags_Out (attacker, attacker, -1, 0, 1, 1, 1); /* attacker.real_frags = attacker.real_frags - 1; if (teamplay & TEAMPLAY_VAMPIRE) //WK @@ -690,19 +705,16 @@ void(entity targ, entity attacker) ClientObituary = attacker.frags = attacker.real_frags; */ bprint (PRINT_MEDIUM, targ.netname); - - deathstring = " kills himself!\n"; if (deathmsg == DMSG_GREN_HAND) deathstring = " grenades himself\n"; - else if (deathmsg == DMSG_MARTYR) - { - + else if (deathmsg == DMSG_MARTYR) { + //if (rnum <= 0.5) deathstring = " dies for the cause\n"; //else // deathstring = " is persecuted to death\n"; - + /* //if (!(targ.job & JOB_MARTYR_ENEMY)) { @@ -715,7 +727,7 @@ void(entity targ, entity attacker) ClientObituary = { //Give last person who attacked him a frag if (targ.martyr_enemy.classname == "player" && targ.martyr_enemy.has_disconnected == FALSE) { - Give_Frags_Out(targ.martyr_enemy, targ, 1, 1, 1, 1, 0); + Give_Frags_Out (targ.martyr_enemy, targ, 1, 1, 1, 1, 0); } if (rnum <= 0.5) deathstring = " dies for the cause\n"; @@ -727,9 +739,8 @@ void(entity targ, entity attacker) ClientObituary = { deathstring = "'s body explodes!\n"; }*/ - else if (deathmsg == DMSG_BERSERK) - { - if (rnum < 0.5) + else if (deathmsg == DMSG_BERSERK) { + if (random () < FRAC (1, 2)) deathstring = " collapses from exhaustion\n"; else deathstring = " goes down fighting\n"; @@ -776,25 +787,22 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " drove an axe through his own head!\n"; else if (deathmsg == DMSG_BACKSTAB) deathstring = " drove a knife into his own heart!\n"; - else if (deathmsg == DMSG_FGTRAP) deathstring = " explodes with his own (trapped) field generator!\n"; - else if (deathmsg == DMSG_CALTROP) deathstring = " stepped on too many of his own caltrops\n"; else if (deathmsg == DMSG_FLYCALTROP) deathstring = " was spiked by his own catlrop\n"; - else if (deathmsg == DMSG_ROCKETL) - { - if (rnum < 0.5) + else if (deathmsg == DMSG_ROCKETL) { + if (random () < FRAC (1, 2)) deathstring = " becomes bored with life\n"; else deathstring = " checks if his weapon is loaded\n"; } else if (deathmsg == DMSG_CLUSTER_ROCKET) - deathstring = " eats his clusters\n"; + deathstring = " eats his clusters\n"; else if (deathmsg == DMSG_LASERCANNON) - deathstring = " blasts himself\n"; + deathstring = " blasts himself\n"; else if (deathmsg == DMSG_INCENDIARY) deathstring = " chars himself with an incendiary rocket\n"; else if (deathmsg == DMSG_GRENADEL) @@ -806,22 +814,22 @@ void(entity targ, entity attacker) ClientObituary = else if (deathmsg == DMSG_LIGHTNING) deathstring = " electrocutes himself\n"; else if (deathmsg == DMSG_LIGHTNING && targ.waterlevel > 1) - { - bprint (PRINT_MEDIUM, " discharges into the water.\n"); - return; - } - - bprint(PRINT_MEDIUM, deathstring); + deathstring = " discharges into the water.\n"; + else + deathstring = " kills himself!\n"; + + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, deathstring); return; } - else if (teamplay && Teammate(targ.team_no,attacker.team_no)) + else if (teamplay && Teammate (targ.team_no, attacker.team_no)) { // killed a team member - if (Teammate(targ.team_no,attacker.team_no) ) - Give_Frags_Out(attacker, attacker, -1, 0, 1, 1, 0); + if (Teammate (targ.team_no, attacker.team_no) ) + Give_Frags_Out (attacker, attacker, -1, 0, 1, 1, 0); // attacker.real_frags = attacker.real_frags - 1; // killed a team member else - Give_Frags_Out(attacker, attacker, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker, attacker, 1, 0, 1, 1, 0); // attacker.real_frags = attacker.real_frags + 1; // if (!(toggleflags & TFLAG_TEAMFRAGS)) @@ -842,39 +850,36 @@ void(entity targ, entity attacker) ClientObituary = return; } - if (rnum < 0.25) - { + local float rnum = random (); + if (rnum < FRAC (1, 4)) { bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " mows down teammate "); bprint (PRINT_MEDIUM, targ.netname); - } - else if (rnum < 0.50) - { + } else if (rnum < FRAC (2, 4)) { bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " checks his glasses after killing "); bprint (PRINT_MEDIUM, targ.netname); - } - else if (rnum < 0.75) - { + } else if (rnum < FRAC (3, 4)) { bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " gets a frag for the other team with "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, "'s death"); - } - else - { + } else { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " doesn't wuv "); bprint (PRINT_MEDIUM, attacker.netname); bprint (PRINT_MEDIUM, " any more! Wah!"); } - bprint (PRINT_MEDIUM, "\n"); + bprint (PRINT_MEDIUM, "\n"); return; } else { - Give_Frags_Out(attacker, targ, 1, 1, 1, 1, 1); + local string deathstring; + local string deathstring2; + + Give_Frags_Out (attacker, targ, 1, 1, 1, 1, 1); //CH // attacker.real_frags = attacker.real_frags + 1; if (attacker.tfstate & TFSTATE_INSPIRED) { @@ -902,127 +907,84 @@ void(entity targ, entity attacker) ClientObituary = attacker.frags = attacker.real_frags; targ.frags = targ.real_frags; //In case of vampire } - + */ - if (deathmsg == DMSG_CLUSTER_ROCKET) - { - if (rnum < 0.5) - { + if (deathmsg == DMSG_CLUSTER_ROCKET) { + if (random () < FRAC (1, 2)) { deathstring = " is put away by "; deathstring2 = "'s cluster rockets\n"; - } - else - { + } else { deathstring = " is destroyed by "; deathstring2 = "'s cluster rockets\n"; } - } - else if (deathmsg == DMSG_EXPBODY) - { + } else if (deathmsg == DMSG_EXPBODY) { deathstring = " is killed by "; deathstring2 = "'s body explosion\n"; - } - else if (deathmsg == DMSG_GREN_HAND) - { + } else if (deathmsg == DMSG_GREN_HAND) { deathstring = " surfs on a grenade from "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_GREN_NAIL) - { + } else if (deathmsg == DMSG_GREN_NAIL) { deathstring = " gets flayed by "; deathstring2 = "'s nail grenade\n"; - } - else if (deathmsg == DMSG_GREN_FRAG) //WK - { - if (rnum < 0.5) { + } else if (deathmsg == DMSG_GREN_FRAG) { + local float rnum = random (); + if (rnum < FRAC (2, 4)) { deathstring = " is slashed apart by "; deathstring2 = "'s frag grenade\n"; - } - else if (rnum < 0.75) { + } else if (rnum < FRAC (3, 4)) { deathstring = "'s jugular artery is severed by "; deathstring2 = "'s frag grenade.\n"; - } - else { + } else { deathstring = "'s carotoid artery is severed by "; deathstring2 = "'s frag grenade.\n"; } - } - else if (deathmsg == DMSG_GREN_MIRV) - { + } else if (deathmsg == DMSG_GREN_MIRV) { deathstring = " gets spammed by "; deathstring2 = "'s Mirv grenade\n"; - } - else if (deathmsg == DMSG_CALTROP) - { + } else if (deathmsg == DMSG_CALTROP) { deathstring = " collects one too many of "; deathstring2 = "'s caltrops\n"; - } - else if (deathmsg == DMSG_FLYCALTROP) - { + } else if (deathmsg == DMSG_FLYCALTROP) { deathstring = " was spiked by "; deathstring2 = "'s caltrops\n"; - } - else if (deathmsg == DMSG_GREN_PIPE) - { + } else if (deathmsg == DMSG_GREN_PIPE) { deathstring = " is caught by "; deathstring2 = "'s pipebomb trap\n"; - } - else if (deathmsg == DMSG_GREN_GAS) - { + } else if (deathmsg == DMSG_GREN_GAS) { deathstring = " gags on "; deathstring2 = "'s noxious gasses\n"; - } - else if (deathmsg == DMSG_GREN_EMP) - { + } else if (deathmsg == DMSG_GREN_EMP) { deathstring = "'s ammo detonates him as "; deathstring2 = "'s EMP fries it.\n"; - } - else if (deathmsg == DMSG_GREN_FLASH) - { + } else if (deathmsg == DMSG_GREN_FLASH) { deathstring = " is charred by "; deathstring2 = "'s flash grenade.\n"; - } - else if (deathmsg == DMSG_GREN_EMP_AMMO) - { + } else if (deathmsg == DMSG_GREN_EMP_AMMO) { deathstring = " stands near some ammo as "; deathstring2 = "'s EMP nukes it\n"; - } - else if (deathmsg == DMSG_DETPACK) - { + } else if (deathmsg == DMSG_DETPACK) { deathstring = " reaches orbit via "; deathstring2 = "'s detpack\n"; - } - else if (deathmsg == DMSG_DETPACK_DIS) - { + } else if (deathmsg == DMSG_DETPACK_DIS) { deathstring = " cut the red wire of "; deathstring2 = "'s detpack\n"; - } - else if (deathmsg == DMSG_BIOWEAPON) - { + } else if (deathmsg == DMSG_BIOWEAPON) { deathstring = " dies from "; - deathstring2 = "'s mysterious tropical disease\n"; - } - else if (deathmsg == DMSG_MAUSER) - { + deathstring2 = "'s mysterious tropical disease\n"; + } else if (deathmsg == DMSG_MAUSER) { /* deathstring = " is assassinated by "; deathstring2 = "'s Mauser WK-77\n"; */ - sprint(attacker, PRINT_HIGH, "You mercilessly slaughter "); - sprint(attacker, PRINT_HIGH, targ.netname); - sprint(attacker, PRINT_HIGH, "!\n"); + sprint (attacker, PRINT_HIGH, "You mercilessly slaughter "); + sprint (attacker, PRINT_HIGH, targ.netname); + sprint (attacker, PRINT_HIGH, "!\n"); return; - } - else if (deathmsg == DMSG_DAEDALUS) - { + } else if (deathmsg == DMSG_DAEDALUS) { deathstring = " is melted by "; - deathstring2 = "'s Daedalus impulse rifle\n"; - } - else if (deathmsg == DMSG_BIOWEAPON_ATT) - { + deathstring2 = "'s Daedalus impulse rifle\n"; + } else if (deathmsg == DMSG_BIOWEAPON_ATT) { deathstring = " escapes infection from "; deathstring2 = " by dying first\n"; - } - else if (deathmsg == DMSG_GRENADEL) - { + } else if (deathmsg == DMSG_GRENADEL) { deathstring = " eats "; deathstring2 = "'s pineapple\n"; if (targ.health < -40) @@ -1030,24 +992,16 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " was gibbed by "; deathstring2 = "'s grenade\n"; } - } - else if (deathmsg == DMSG_STUCK_FORCEFIELD) - { + } else if (deathmsg == DMSG_STUCK_FORCEFIELD) { deathstring = " is fried in "; deathstring2 = "'s force field\n"; - } - else if (deathmsg == DMSG_FORCEFIELD) - { + } else if (deathmsg == DMSG_FORCEFIELD) { deathstring = " had a shocking experience on "; deathstring2 = "'s force field\n"; - } - else if (deathmsg == DMSG_FGTRAP) - { + } else if (deathmsg == DMSG_FGTRAP) { deathstring = " explodes with "; deathstring2 = "'s trapped field generator\n"; - } - else if (deathmsg == DMSG_ROCKETL) - { + } else if (deathmsg == DMSG_ROCKETL) { deathstring = " rides "; deathstring2 = "'s rocket\n"; if (targ.health < -40) @@ -1055,204 +1009,133 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " was gibbed by "; deathstring2 = "'s rocket\n" ; } - } - else if (deathmsg == DMSG_HOVER) //WK - { + } else if (deathmsg == DMSG_HOVER) { deathstring = " choked on "; deathstring2 = "'s hover exhaust\n"; - } - else if (deathmsg == DMSG_LAND_MINE) //WK - { - deathstring2 = "'s land mine\n"; - - if (rnum < 0.8) - deathstring = " walked over "; - else - deathstring = " was launched 40 ft into the air by "; - - if (targ.health < -40) - { - if (rnum < 0.8) + } else if (deathmsg == DMSG_LAND_MINE) { + if (targ.health < -40) { + if (random () < FRAC (4, 5)) deathstring = " was turned into a shower of gibs by "; - else + else deathstring = " was launched 80 ft into the air by "; + } else { + if (random () < FRAC (4, 5)) + deathstring = " walked over "; + else + deathstring = " was launched 40 ft into the air by "; } - } - else if (deathmsg == DMSG_FLAME) - { - if (rnum < 0.2) - { + deathstring2 = "'s land mine\n"; + } else if (deathmsg == DMSG_FLAME) { + local float rnum = random (); + if (rnum < FRAC (1, 5)) { deathstring = " is burnt up by "; deathstring2 = "'s flame\n"; - } - else if (rnum < 0.4) - { + } else if (rnum < FRAC (2, 5)) { deathstring = " is fried by "; deathstring2 = "'s fire\n"; - } - else if (rnum < 0.6) - { + } else if (rnum < FRAC (3, 5)) { deathstring = " feels "; deathstring2 = "'s fire of wrath\n"; - } - else if (rnum < 0.8) - { + } else if (rnum < FRAC (4, 5)) { deathstring = " is reduced to ashes by "; deathstring2 = "\n"; - } - else - { + } else { deathstring = " is grilled by "; deathstring2 = "'s flame\n"; } - } - else if (deathmsg == DMSG_AXE) - { + } else if (deathmsg == DMSG_AXE) { + if (attacker.cutf_items & CUTF_KNIFE) { + if (attacker.job & JOB_WARLOCK) + deathstring = " is forced to donate his blood by "; + else + deathstring = " was knife-murdered by "; + } else + deathstring = " was axe-murdered by "; + deathstring2 = "\n"; - if (attacker.cutf_items & CUTF_KNIFE) - { - if (attacker.job & JOB_WARLOCK) - { - deathstring = " is forced to donate his blood by "; - deathstring2 = "\n"; - } - else - { - deathstring = " was knife-murdered by "; - } - } - else - deathstring = " was axe-murdered by "; - //if (attacker.demon_blood < 0) //WK Sanity Check // attacker.demon_blood = 0; // if the above ever happens you've got a serious bug that needs fixing // don't get around it by cheap hacks - SB - + if (attacker.demon_blood < MAX_KNIFE_BLOOD) //SB - OfN defined max now attacker.demon_blood = attacker.demon_blood + 1; - } - else if (deathmsg == DMSG_SPANNER) - { + } else if (deathmsg == DMSG_SPANNER) { deathstring = " was spanner-murdered by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_SHOTGUN) - { + } else if (deathmsg == DMSG_SHOTGUN) { deathstring = " chewed on "; deathstring2 = "'s boomstick\n"; - } - else if (deathmsg == DMSG_SSHOTGUN) - { + } else if (deathmsg == DMSG_SSHOTGUN) { deathstring = " ate 2 loads of "; deathstring2 = "'s buckshot\n"; - } - else if (deathmsg == DMSG_NAILGUN) - { + } else if (deathmsg == DMSG_NAILGUN) { deathstring = " was nailed by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_SNG) - { + } else if (deathmsg == DMSG_SNG) { deathstring = " was spiked by "; deathstring2 = "'s super nailgun\n"; - } - else if (deathmsg == DMSG_LIGHT_ASSAULT) - { - if (rnum <= 0.1) { + } else if (deathmsg == DMSG_LIGHT_ASSAULT) { + local float rnum = random (); + if (rnum < FRAC (1, 10)) { deathstring = " wishes "; deathstring2 = "'s gun was still an SNG\n"; - } - else if (rnum <= 0.5) { + } else if (rnum < FRAC (5, 10)) { deathstring = " gets felled by "; deathstring2 = "'s light assault cannon\n"; - } - else { + } else { deathstring = " gets sawn almost in half by "; deathstring2 = "\n"; } - } - else if (deathmsg == DMSG_LIGHTNING) - { - if (rnum <= 0.1) { + } else if (deathmsg == DMSG_LIGHTNING) { + local float rnum = random (); + if (rnum < FRAC (1, 10)) { deathstring = " has never seen a lightning gun in TF before. ("; deathstring2 = " has.)\n"; - } - else if (rnum <= 0.2) { + } else if (rnum < FRAC (2, 10)) { deathstring = " is thunderstruck by "; deathstring2 = "'s gun\n"; - } - else if (rnum <= 0.4) { + } else if (rnum < FRAC (4, 10)) { deathstring = " is electrocuted by "; deathstring2 = "'s thunderbolt\n"; - } - else if (rnum <= 0.7) { + } else if (rnum < FRAC (7, 10)) { deathstring = " is shocked to death by "; deathstring2 = "'s lightning gun\n"; - } - else { + } else { deathstring = " accepts "; if (attacker.waterlevel > 1) deathstring2 = "'s discharge\n"; else deathstring2 = "'s shaft\n"; } - } - else if (deathmsg == DMSG_HOOK) - { + } else if (deathmsg == DMSG_HOOK) { deathstring = " grappled with "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_JUDOKA) - { + } else if (deathmsg == DMSG_JUDOKA) { deathstring = " had his arms broken by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_AIRG) - { + } else if (deathmsg == DMSG_AIRG) { deathstring = " is ventilated by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_LASERCANNON) - { + } else if (deathmsg == DMSG_LASERCANNON) { deathstring = " was blasted by "; deathstring2 = "'s laser cannon\n"; - } - else if (deathmsg == DMSG_DISPEL) - { + } else if (deathmsg == DMSG_DISPEL) { deathstring = " is banished to the netherworld by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_AIRG_WATER) - { - if (rnum < 0.5) - { + } else if (deathmsg == DMSG_AIRG_WATER) { + if (random () < FRAC (1, 2)) { deathstring = " learns to swim backwards with "; deathstring2 = "'s help\n"; - } - else - { + } else { deathstring = " is underwater-airfisted by "; deathstring2 = "\n"; } - } - else if (deathmsg == DMSG_SNIPERRIFLE) - { - if (rnum <= 0.5) - { - deathstring = " takes a bullet in the chest from "; - deathstring2 = "\n"; - } - else - { - deathstring = " succumbs to sniperfire from "; - deathstring2 = "\n"; - } - if (attacker.cutf_items & CUTF_OTR) //- OfN - { + } else if (deathmsg == DMSG_SNIPERRIFLE) { + if (attacker.cutf_items & CUTF_OTR) { //- OfN /*local float rnum2; - rnum2 = random(); + rnum2 = random (); if (rnum2 <= 0.3) { deathstring = " will never be the same after "; @@ -1269,69 +1152,55 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " gets a huge OTR implant from "; deathstring = "\n"; }*/ - } - } - else if (deathmsg == DMSG_SNIPERHEADSHOT) - { - if (rnum <= 0.5) - { - deathstring = " gets a third eye from "; - deathstring2 = "\n"; - } - else - { - deathstring = " gets his head blown off by "; - deathstring2 = "\n"; - } - if (attacker.cutf_items & CUTF_OTR) //- OfN - { - if (random() <= 0.6) - { - deathstring = "'s head flies away due to "; - deathstring2 = " and his OTR bullets\n"; - } - } - } - else if (deathmsg == DMSG_SNIPERLEGSHOT) - { - if (rnum <= 0.5) - { - deathstring = " is made legless by "; - deathstring2 = "\n"; - } - else - { - deathstring = " gets his legs blown off by "; - deathstring2 = "\n"; - } - if (attacker.cutf_items & CUTF_OTR) //- OfN - { - if (random() <= 0.25) - { - deathstring = " owns a metallic replacement for his legs from "; + } else { + if (random () < FRAC (1, 2)) { + deathstring = " takes a bullet in the chest from "; + deathstring2 = "\n"; + } else { + deathstring = " succumbs to sniperfire from "; deathstring2 = "\n"; } } - } - else if (deathmsg == DMSG_AUTORIFLE) - { - deathstring = " collects "; - deathstring2 = "'s bullet spray.\n"; - } - else if (deathmsg == DMSG_ASSAULTCANNON) - { - deathstring = " gets sawn in half by "; - deathstring2 = "\n"; - } - else if (deathmsg == DMSG_BACKSTAB) - { - if (rnum < 0.5) - { - deathstring = " gets assassinated by "; + } else if (deathmsg == DMSG_SNIPERHEADSHOT) { + if (random () < FRAC (1, 2)) { + deathstring = " gets a third eye from "; + deathstring2 = "\n"; + } else { + deathstring = " gets his head blown off by "; deathstring2 = "\n"; } - else - { + + if (attacker.cutf_items & CUTF_OTR) //- OfN + if (random () < FRAC (3, 5)) { + deathstring = "'s head flies away due to "; + deathstring2 = " and his OTR bullets\n"; + } + } else if (deathmsg == DMSG_SNIPERLEGSHOT) { + if (random () < FRAC (1, 2)) { + deathstring = " is made legless by "; + deathstring2 = "\n"; + } else { + deathstring = " gets his legs blown off by "; + deathstring2 = "\n"; + } + + if (attacker.cutf_items & CUTF_OTR) //- OfN + if (random () < FRAC (1, 4)) { + deathstring = " owns a metallic replacement" + + " for his legs from "; + deathstring2 = "\n"; + } + } else if (deathmsg == DMSG_AUTORIFLE) { + deathstring = " collects "; + deathstring2 = "'s bullet spray.\n"; + } else if (deathmsg == DMSG_ASSAULTCANNON) { + deathstring = " gets sawn in half by "; + deathstring2 = "\n"; + } else if (deathmsg == DMSG_BACKSTAB) { + if (random () < FRAC (1, 2)) { + deathstring = " gets assassinated by "; + deathstring2 = "\n"; + } else { deathstring = " is knifed from behind by "; deathstring2 = "\n"; } @@ -1340,21 +1209,18 @@ void(entity targ, entity attacker) ClientObituary = // See previous comment - SB if (attacker.demon_blood < MAX_KNIFE_BLOOD) //SB attacker.demon_blood = attacker.demon_blood + 1; - } - else if (deathmsg == DMSG_TRANQ) - { + } else if (deathmsg == DMSG_TRANQ) { deathstring = " is put to sleep by "; deathstring2 = "\n"; - } - else if (deathmsg == DMSG_LASERBOLT) - { + } else if (deathmsg == DMSG_LASERBOLT) { deathstring = " gets a hole in his heart from "; deathstring2 = "'s railgun\n"; - } - else if (deathmsg == DMSG_INCENDIARY) - { + } else if (deathmsg == DMSG_INCENDIARY) { deathstring = " gets well done by "; deathstring2 = "'s incendiary rocket\n"; + } else { + deathstring = " has a BUG death ("; + deathstring2 = ")\n"; } bprint (PRINT_MEDIUM, targ.netname); @@ -1372,7 +1238,7 @@ void(entity targ, entity attacker) ClientObituary = { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " dispenses with himself\n"); - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); } else { @@ -1380,10 +1246,10 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " didn't insert the correct change into "); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s dispenser\n"); - if (Teammate(targ.team_no,attacker.team_no)) - Give_Frags_Out(attacker, attacker, -1, 0, 1, 1, 0); + if (Teammate (targ.team_no, attacker.team_no)) + Give_Frags_Out (attacker, attacker, -1, 0, 1, 1, 0); else - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); } } else @@ -1392,7 +1258,7 @@ void(entity targ, entity attacker) ClientObituary = { bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " is blown apart by his trapped dispenser\n"); - Give_Frags_Out(attacker.real_owner, attacker, -1, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker, -1, 0, 1, 1, 0); } else if (targ == attacker.martyr_enemy) { @@ -1400,7 +1266,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " should've stayed away from "); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s dispenser\n"); - Give_Frags_Out(attacker.martyr_enemy, attacker, -1, 0, 1, 1, 0); + Give_Frags_Out (attacker.martyr_enemy, attacker, -1, 0, 1, 1, 0); } else { @@ -1410,7 +1276,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " is blown to pieces by "); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s trapped dispenser\n"); - Give_Frags_Out(attacker.martyr_enemy, targ, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker.martyr_enemy, targ, 1, 0, 1, 1, 0); } } return; @@ -1423,7 +1289,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " laughs as "); bprint (PRINT_MEDIUM, targ.netname); bprint (PRINT_MEDIUM, " fries in his own hacked force field\n"); - Give_Frags_Out(attacker.real_owner, attacker, -1, 0, 1, 1, 0); + Give_Frags_Out (attacker.real_owner, attacker, -1, 0, 1, 1, 0); } else if (targ == attacker.martyr_enemy) { @@ -1431,7 +1297,7 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " remembers that corrupting the output on "); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s fieldgen doesn't protect him any\n"); - Give_Frags_Out(attacker.martyr_enemy, attacker, -1, 0, 1, 1, 0); + Give_Frags_Out (attacker.martyr_enemy, attacker, -1, 0, 1, 1, 0); } else { @@ -1441,13 +1307,15 @@ void(entity targ, entity attacker) ClientObituary = bprint (PRINT_MEDIUM, " is fried in "); bprint (PRINT_MEDIUM, attacker.real_owner.netname); bprint (PRINT_MEDIUM, "'s hacked force field\n"); - Give_Frags_Out(attacker.martyr_enemy, targ, 1, 0, 1, 1, 0); + Give_Frags_Out (attacker.martyr_enemy, targ, 1, 0, 1, 1, 0); } } else if (attacker.classname == "building_sentrygun" || attacker.classname == "building_tesla") { if (targ == attacker.real_owner) { + local string deathstring; + if (deathmsg == DMSG_SENTRYGUN_ROCKET) deathstring = " intercepts his sentry gun's rocket\n"; else if (deathmsg == DMSG_SENTRYGUN_BULLET) @@ -1456,80 +1324,84 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " was electrocuted by his own sentry\n"; else deathstring = " let his sentry turn against him\n"; //CH - - bprint(PRINT_MEDIUM, targ.netname); - bprint(PRINT_MEDIUM, deathstring); + + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, deathstring); + return; } else { - if (Teammate(targ.team_no, attacker.team_no)) {//remove frags if team member - //CH its not the sentry/tesla's fault so only take from owner - // Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //gun - Give_Frags_Out(attacker.real_owner, targ, -1, 1, 1, 1, 0); - } else { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //gun - Give_Frags_Out(attacker.real_owner, targ, 1, 1, 1, 1, 0); - } + local string deathstring; + local string deathstring2; - if (deathmsg == DMSG_SENTRYGUN_ROCKET) - { + if (Teammate (targ.team_no, attacker.team_no)) { + // remove frags if team member + //CH its not the sentry/tesla's fault so only take from owner + // Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //gun + Give_Frags_Out (attacker.real_owner, targ, -1, 1, 1, 1, 0); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //gun + Give_Frags_Out (attacker.real_owner, targ, 1, 1, 1, 1, 0); + } + + if (deathmsg == DMSG_SENTRYGUN_ROCKET) { deathstring = " hates "; deathstring2 = "'s sentry gun\n"; - } - else if (deathmsg == DMSG_SENTRYGUN_BULLET) - { + } else if (deathmsg == DMSG_SENTRYGUN_BULLET) { deathstring = " is mown down by "; deathstring2 = "'s sentry gun\n"; - } - else if (deathmsg == DMSG_TESLA) - { - if (rnum < 0.5) { + } else if (deathmsg == DMSG_TESLA) { + local float rnum = random (); + if (rnum < FRAC (2, 4)) { deathstring = " was electrocuted by "; deathstring2 = "'s tesla coil\n"; - } - else if (rnum < 0.75) { + } else if (rnum < FRAC (3, 4)) { deathstring = " was shocked to pieces by "; deathstring2 = "'s tesla sentry\n"; - } - else { + } else { deathstring = " was annihilated by "; deathstring2 = "'s tesla gun\n"; } - } - else if (deathmsg == DMSG_BUG_ZAPPER) - { - if (rnum < 0.20) { + } else if (deathmsg == DMSG_BUG_ZAPPER) { + local float rnum = random (); + if (rnum < FRAC (1, 5)) { deathstring = " made a frying sound after running into "; deathstring2 = "'s Sentry Point Defense System\n"; - } else if (rnum < 0.4) { + } else if (rnum < FRAC (1, 5)) { deathstring = " is cooked at 400 degrees by "; deathstring2 = "'s sentry gun\n"; - } else if (rnum < 0.6) { + } else if (rnum < FRAC (1, 5)) { deathstring = " is disintegrated by "; deathstring2 = "'s Sentry Point Defense System\n"; - } else if (rnum < 0.8) { + } else if (rnum < FRAC (1, 5)) { deathstring = " is obliterated by "; deathstring2 = "'s sentry gun\n"; } else { deathstring = " decides "; deathstring2 = "'s sentry isn't so cuddly after all!\n"; } + } else { + deathstring = " is given a BUG death from "; + deathstring2 = "'s sentry\n"; } - bprint(PRINT_MEDIUM, targ.netname); - bprint(PRINT_MEDIUM, deathstring); - bprint(PRINT_MEDIUM, attacker.real_owner.netname); - bprint(PRINT_MEDIUM, deathstring2); + + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, deathstring); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, deathstring2); } } else if (attacker.classname == "building_teleporter") { - sprint(attacker.martyr_enemy, PRINT_HIGH, targ.netname); - sprint(attacker.martyr_enemy, PRINT_HIGH, " disappears into the void.\n"); + sprint (attacker.martyr_enemy, PRINT_HIGH, targ.netname); + sprint (attacker.martyr_enemy, PRINT_HIGH, " disappears into the void.\n"); return; } else { - Give_Frags_Out(targ, targ, -1, 1, 1, 1, 0); + local string deathstring; + + Give_Frags_Out (targ, targ, -1, 1, 1, 1, 0); /* logfrag (targ, targ); @@ -1537,36 +1409,33 @@ void(entity targ, entity attacker) ClientObituary = if (!(toggleflags & TFLAG_TEAMFRAGS)) targ.frags = targ.real_frags; */ - rnum = targ.watertype; bprint (PRINT_HIGH, targ.netname); - if (rnum == -3) + if (targ.watertype == CONTENTS_WATER) { - local float i = random (); - if (i < 0.25) + local float rnum = random (); + if (rnum < FRAC (1, 4)) deathstring = " sleeps with the fishes\n"; - else if (i < 0.5) + else if (rnum < FRAC (2, 4)) deathstring = " ate before swimming\n"; //CH - else if (i < 0.75) + else if (rnum < FRAC (3, 4)) deathstring = " was searching for Atlantis when he drowned\n"; else deathstring = " thought he was Jacques Cousteau, but forgot his diving gear!\n"; } - else if (rnum == -4) + else if (targ.watertype == CONTENTS_SLIME) { - if (random() < 0.5) + if (random () < FRAC (1, 2)) deathstring = " gulped a load of slime\n"; else deathstring = " can't exist on slime alone\n"; } - else if (rnum == -5) + else if (targ.watertype == CONTENTS_LAVA) { if (targ.health < -15) - { deathstring = " burst into flames\n"; - } - else if (random() < 0.5) + else if (random () < FRAC (1, 2)) deathstring = " turned into hot slag\n"; else deathstring = " visits the Volcano God\n"; @@ -1576,9 +1445,9 @@ void(entity targ, entity attacker) ClientObituary = deathstring = " blew up\n"; } else if (attacker.solid == SOLID_BSP && attacker != world) - { + { deathstring = " was squished\n"; - } + } else if (attacker.classname == "trap_shooter" || attacker.classname == "trap_spikeshooter" || attacker.classname == "trap_tf_spikeshooter" || attacker.classname == "trap_tf_shooter") { if (attacker.deathtype) @@ -1616,1319 +1485,1156 @@ void(entity targ, entity attacker) ClientObituary = } else //- OfN - unknown death by himself { - rnum = random(); - - if (rnum < 0.20) + local float rnum = random (); + + if (rnum < FRAC (1, 5)) deathstring = " died happily\n"; - else if (rnum < 0.40) + else if (rnum < FRAC (2, 5)) deathstring = " knows how to die with style\n"; - else if (rnum < 0.60) + else if (rnum < FRAC (3, 5)) deathstring = " simply dies\n"; - else if (rnum < 0.80) + else if (rnum < FRAC (4, 5)) deathstring = " had an original death\n"; else deathstring = " wishes we had better death messages\n"; } - bprint(PRINT_MEDIUM, deathstring); + bprint (PRINT_MEDIUM, deathstring); return; //- ofn } } - else if (IsMonster(targ) && attacker.classname == "building_sentrygun") - { - custom_demon_name(targ); //CH - - if ((teamplay) && (attacker.real_owner.team_no > 0) && (targ.real_owner.team_no > 0)) - { - if (!Teammate(targ.real_owner.team_no, attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); - - //bprint (PRINT_MEDIUM, targ.real_owner.netname); - //bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") was killed by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s sentry gun\n"); - return; - - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, -1, 0, 1, 1, 0); - - //bprint (PRINT_MEDIUM, targ.real_owner.netname); - //bprint (PRINT_MEDIUM, " friendly demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") was killed by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s friendly sentry gun\n"); - return; - } - } - } - else if (targ.classname == "monster_wizard") // OfN - { - custom_demon_name(targ); - if (attacker.classname == "building_tesla") - { - if ((teamplay) && (attacker.real_owner.team_no > 0) && (targ.real_owner.team_no > 0)) - { - if (!Teammate(targ.real_owner.team_no, attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); - -/* attacker.frags = attacker.frags + 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, -1, 0, 1, 1, 0); -/* - attacker.frags = attacker.frags - 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags - 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s friendly scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - } - } - else if (attacker.classname == "player") - { - if ((teamplay) && (attacker.team_no > 0) && (self.real_owner.team_no > 0)) - { - if (Teammate(targ.real_owner.team_no,attacker.team_no)) - { - if (attacker == self.real_owner) - { - Give_Frags_Out(attacker, targ, -2, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 2; //Owner -2 - bprint (PRINT_MEDIUM, attacker.netname); - - if (deathmsg == DMSG_LASERCANNON) - bprint (PRINT_MEDIUM, " cuts his own scrag in half!\n"); - else - bprint (PRINT_MEDIUM, " kills his own scrag!\n"); - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - - if (deathmsg == DMSG_LASERCANNON) - bprint (PRINT_MEDIUM, " blasts the friendly scrag "); - else - bprint (PRINT_MEDIUM, " mows down the friendly scrag "); - - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - - if (deathmsg == DMSG_LASERCANNON) - { - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " cuts "); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag in several parts\n"); - } - else - { - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was killed by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, "\n"); - } - - MonsterKill(attacker); // adds knife kill to warlock if needed - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (attacker.classname == "monster_army") - { - custom_demon_name(attacker); - GetRank(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") mows down the friendly scrag "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is killed by "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_demon1") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") eviscerates the friendly scrag "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is returned to hell by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_shambler") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, "The shambler "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") annihilates the friendly scrag "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", learns a lesson from the shambler "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_wizard") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") annihilates the colleague "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s scrag, "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, ", shows to "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") who is the best\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - }//- End scrag death stuff - else if (targ.classname == "monster_demon1") //CH - { - custom_demon_name(targ); //CH - if (attacker.classname == "building_tesla") - { - if ((teamplay) && (attacker.real_owner.team_no > 0) && (targ.real_owner.team_no > 0)) - { - if (!Teammate(targ.real_owner.team_no, attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); - -/* attacker.frags = attacker.frags + 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, -1, 0, 1, 1, 0); -/* - attacker.frags = attacker.frags - 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags - 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s friendly demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - } - } - else if (attacker.classname == "player") - { - if ((teamplay) && (attacker.team_no > 0) && (self.real_owner.team_no > 0)) - { - if (Teammate(targ.real_owner.team_no,attacker.team_no)) - { - if (attacker == self.real_owner) - { - Give_Frags_Out(attacker, targ, -2, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 2; //Owner -2 - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " kills his own fiend!\n"); - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " mows down the friendly demon "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was killed by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, "\n"); - - MonsterKill(attacker); // adds knife kills to warlock - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (attacker.classname == "monster_army") - { - custom_demon_name(attacker); - GetRank(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") mows down the friendly demon "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", didn't have a prayer against "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_demon1") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") eviscerates the friendly demon "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", realises too late that "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") wasn't just trying to be friendly\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_shambler") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") annihilates the friendly demon "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is given a firm farewell to the netherworld by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_wizard") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") kills the friendly demon "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s demon, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is killed by the scrag "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (targ.classname == "monster_army") //CH - { - custom_demon_name(targ); //CH - GetRank(targ); - if (attacker.classname == "building_tesla") - { - if ((teamplay) && (attacker.real_owner.team_no > 0) && (targ.real_owner.team_no > 0)) - { - if (!Teammate(targ.real_owner.team_no, attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); - -/* attacker.frags = attacker.frags + 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s mercenary soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, -1, 0, 1, 1, 0); -/* - attacker.frags = attacker.frags - 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags - 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s friendly soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was shocked to death by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - } - } - if (attacker.classname == "player") - { - if ((teamplay) && (attacker.team_no > 0) && (self.real_owner.team_no > 0)) - { - if (Teammate(targ.real_owner.team_no,attacker.team_no)) - { - if (attacker == self.real_owner) - { - Give_Frags_Out(attacker, targ, -2, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 2; //Owner -2 - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " kills his own soldier!\n"); - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " mows down the friendly soldier "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s mercenary soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was killed by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, "\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (attacker.classname == "monster_shambler") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") slaps the friendly soldier "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") into oblivion\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is smacked down by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_demon1") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") disembowels the friendly soldier "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is now listed as KIA thanks to "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_army") - { - custom_demon_name(attacker); - GetRank(attacker); - - if (targ==attacker) //- OfN - It *may* happen - { - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s soldier, "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, ", explodes with his own rockets!\n"); - return; - } - - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") mows down comrade-in-arms "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", takes a bullet in the chest from "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_wizard") - { - custom_demon_name(attacker); - //GetRank(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - //bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, "The scrag "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") kills the friendly soldier "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s soldier, "); - bprint (PRINT_MEDIUM, targ.undercover_name); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is killed by the scrag "); - //bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (targ.classname == "monster_shambler") //CH - { - custom_demon_name(targ); //CH - if (attacker.classname == "building_tesla") - { - if ((teamplay) && (attacker.real_owner.team_no > 0) && (targ.real_owner.team_no > 0)) - { - if (!Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); - -/* attacker.frags = attacker.frags + 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s shambler, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was given a shocking surprise by "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, -1, 0, 1, 1, 0); -/* - attacker.frags = attacker.frags - 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags - 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s friendly shambler, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", shouldn't play so close to "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - } - } - if (attacker.classname == "player") - { - if ((teamplay) && (attacker.team_no > 0) && (self.real_owner.team_no > 0)) - { - if (Teammate(targ.real_owner.team_no,attacker.team_no)) - { - if (attacker == self.real_owner) - { - Give_Frags_Out(attacker, targ, -2, 0, 1, 1, 0); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " kills his own shambler!\n"); -// attacker.real_frags = attacker.real_frags - 2; //Owner -2 - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " mows down the friendly shambler "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s shambler, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", was felled by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, "\n"); - - MonsterKill(attacker); // adds knife kills to warlock - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - } - else if (attacker.classname == "monster_demon1") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") checks its aura after killing "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s shambler, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", is torn apart by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_shambler") - { - custom_demon_name(attacker); - if (Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") electrifies the friendly shambler "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s shambler, "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, ", finds losing against shambler "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") to be a fatal experience\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_army") - { - custom_demon_name(attacker); - GetRank(attacker); - if ( Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") is caught in the crossfire from "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") proves to "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") that size doesn't matter\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - else if (attacker.classname == "monster_wizard") - { - custom_demon_name(attacker); - //GetRank(attacker); - - // condition reversed forconvenience - if (!Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags - 1; // killed a team demon - - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ") had his army career truncated by the scrag "); - //bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } - else - { - Give_Frags_Out(attacker, targ, -1, 0, 1, 1, 0); -// attacker.real_frags = attacker.real_frags + 1; - //bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, "The scrag "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ") kills the friendly soldier "); - bprint (PRINT_MEDIUM, targ.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - } -// if (!(toggleflags & TFLAG_TEAMFRAGS)) -// attacker.frags = attacker.real_frags; - return; - } - - } - else if (IsBuilding(targ) && targ.classname != "building_sentrygun_base" && attacker.classname == "building_tesla") //Evil Tesla! - { - if (!Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - if (targ.classname == "building_sentrygun" || - targ.classname == "building_tesla") - { - Give_Frags_Out(attacker, targ, 1, 0, 2, 0, 0); //Tesla - Give_Frags_Out(attacker.real_owner, targ, 1, 0, 1, 1, 0); -/* - attacker.frags = attacker.frags + 1; //Tesla - attacker.real_owner.real_frags = attacker.real_owner.real_frags + 1; //Player - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.real_owner.frags = attacker.real_owner.real_frags; -*/ - } - } - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s "); - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser was zapped by"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun was no match for"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera was vaporized by"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor was obliterated by"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad was short circuted by"); - else if (targ.classname == "building_tesla" && attacker == targ) - { - bprint (PRINT_MEDIUM, "tesla coil destroys itself.\n"); - return; - } - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry lost the battle against"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor was fucked up by"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator was destroyed by"); - else - bprint (PRINT_MEDIUM, "??Building??"); - bprint (PRINT_MEDIUM, " "); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, "'s tesla sentry\n"); - return; - } - else if (IsBuilding(targ) && targ.classname != "building_sentrygun_base") - { - - //- OfN - Weird but may happen.. like when a sentry is blown up by its own rocket - if (attacker == targ) - { - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s "); - - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad"); - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator"); - else - bprint (PRINT_MEDIUM, "??Building??"); - - bprint (PRINT_MEDIUM, " destroys itself.\n"); - return; - } - - if (attacker.classname == "teledeath") - { - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s "); - - //bprint (PRINT_MEDIUM,GetBuildingName(targ)); - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad"); - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator"); - else - bprint (PRINT_MEDIUM, "??Building??"); - - bprint (PRINT_MEDIUM, " was telefragged by "); - bprint (PRINT_MEDIUM, attacker.owner.netname); - bprint (PRINT_MEDIUM, "\n"); - return; - } - - if (attacker.classname == "player") - { - if (attacker == targ.real_owner) - { - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, " destroys his "); - - //bprint (PRINT_MEDIUM,GetBuildingName(targ)); - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad"); - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator"); - else - bprint (PRINT_MEDIUM, "??Building??"); - bprint (PRINT_MEDIUM, "\n"); - return; - } - - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s "); - - //bprint (PRINT_MEDIUM,GetBuildingName(targ)); //- OfN - FIXED? - - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad"); - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator"); - else - bprint (PRINT_MEDIUM, "??Building??"); - - bprint (PRINT_MEDIUM, " was destroyed by "); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, "\n"); - - if (!Teammate(targ.real_owner.team_no,attacker.team_no)) - { - if (targ.classname == "building_sentrygun" || - targ.classname == "building_tesla") - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -/* - attacker.real_frags = attacker.real_frags + 1; - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.frags = attacker.real_frags; -*/ - } - } - - return; - } - else if (attacker.classname == "monster_army") // SB grunty kills building - { - custom_demon_name(attacker); - GetRank(attacker); - - bprint (PRINT_MEDIUM, targ.real_owner.netname); - bprint (PRINT_MEDIUM, "'s "); - - //bprint(PRINT_MEDIUM,GetBuildingName(targ)); - if (targ.classname == "building_dispenser") - bprint (PRINT_MEDIUM, "dispenser"); - else if (targ.classname == "building_sentrygun") - bprint (PRINT_MEDIUM, "sentrygun"); - else if (targ.classname == "building_camera") - bprint (PRINT_MEDIUM, "security camera"); - else if (targ.classname == "building_teleporter") - bprint (PRINT_MEDIUM, "teleporter pad"); - else if (targ.classname == "building_tesla") - bprint (PRINT_MEDIUM, "tesla sentry"); - else if (targ.classname == "building_sensor") - bprint (PRINT_MEDIUM, "motion sensor"); - else if (targ.classname == "building_fieldgen") - bprint (PRINT_MEDIUM, "field generator"); - else - bprint (PRINT_MEDIUM, "??Building??"); - - bprint (PRINT_MEDIUM, " was destroyed by "); - bprint (PRINT_MEDIUM, attacker.undercover_name); - bprint (PRINT_MEDIUM, attacker.netname); - bprint (PRINT_MEDIUM, " ("); - bprint (PRINT_MEDIUM, attacker.real_owner.netname); - bprint (PRINT_MEDIUM, ")\n"); - - if (!Teammate(targ.real_owner.team_no,attacker.real_owner.team_no)) - { - if (targ.classname == "building_sentrygun" || - targ.classname == "building_tesla") - { - Give_Frags_Out(attacker, targ, 1, 0, 1, 1, 0); -/* - attacker.real_frags = attacker.real_frags + 1; - if (!(toggleflags & TFLAG_TEAMFRAGS)) - attacker.frags = attacker.real_frags; -*/ - } - } - return; - } - } - - //- Miscellaneous monster/army deaths - if (IsMonster(targ)) - { - if (attacker.classname == "explo_box") - { - deathstring = " blew up\n"; - } - else if (attacker.solid == SOLID_BSP && attacker != world) - { - deathstring = " was squished\n"; - } - else if (attacker.classname == "trap_shooter" || attacker.classname == "trap_spikeshooter" || attacker.classname == "trap_tf_spikeshooter" || attacker.classname == "trap_tf_shooter") - { - if (attacker.deathtype) - deathstring = attacker.deathtype; - else if (attacker.spawnflags == SPAWNFLAG_LASER) - deathstring = " had surgery from a laser\n"; - else if (attacker.spawnflags == SPAWNFLAG_TFROCKET) - deathstring = " took a ride on a rocket\n"; - else if (attacker.spawnflags == SPAWNFLAG_TFGRENADE) - deathstring = " tried to eat a wild pineapple\n"; - else if (attacker.spawnflags == SPAWNFLAG_TFFLAME) - deathstring = " was burned alive\n"; - else if (attacker.spawnflags == SPAWNFLAG_SUPERSPIKE) - deathstring = " was nailed to the ground\n"; - else - deathstring = " was spiked\n"; - } - else if (attacker.classname == "fireball") - { - deathstring = " ate a lavaball\n"; - } - else if (attacker.classname == "teledeath") - { - deathstring = " was telefragged by "; - } - else - { - deathstring = " dies\n"; - } - - deathstring2=GetMonsterName(targ); - - bprint(PRINT_HIGH,"The "); - bprint(PRINT_HIGH, deathstring2); - bprint(PRINT_HIGH," "); - bprint(PRINT_HIGH, targ.netname); - bprint(PRINT_HIGH," ("); - bprint(PRINT_HIGH, targ.real_owner.netname); - bprint(PRINT_HIGH,")"); - bprint(PRINT_HIGH, deathstring); - if (attacker.classname == "teledeath") - { - bprint(PRINT_HIGH, attacker.owner.netname); - bprint(PRINT_HIGH,"\n"); - } - - return; - } - +}; + +void (entity targ, entity attacker) Obit_Monster = +{ + if (targ.classname == "monster_wizard") + Obit_Monster_Wizard (targ, attacker); + else if (targ.classname == "monster_demon1") + Obit_Monster_Demon1 (targ, attacker); + else if (targ.classname == "monster_army") + Obit_Monster_Army (targ, attacker); + else if (targ.classname == "monster_shambler") + Obit_Monster_Shambler (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard = +{ + custom_demon_name (targ); + + if (attacker.classname == "building_tesla") + Obit_Monster_Wizard_by_Tesla (targ, attacker); + else if (attacker.classname == "building_sentry") + Obit_Monster_Wizard_by_Sentry (targ, attacker); + else if (attacker.classname == "player") + Obit_Monster_Wizard_by_Player (targ, attacker); + else if (attacker.classname == "monster_army") + Obit_Monster_Wizard_by_Army (targ, attacker); + else if (attacker.classname == "monster_demon1") + Obit_Monster_Wizard_by_Demon1 (targ, attacker); + else if (attacker.classname == "monster_shambler") + Obit_Monster_Wizard_by_Shambler (targ, attacker); + else if (attacker.classname == "monster_wizard") + Obit_Monster_Wizard_by_Wizard (targ, attacker); + else + Obit_Monster_Misc (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Tesla = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Sentry = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was pulverized by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was pulverized by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Player = +{ + if (teamplay + && (attacker.team_no > 0) + && (self.real_owner.team_no > 0)) { + if (Teammate (targ.real_owner.team_no, attacker.team_no)) { + if (attacker == self.real_owner) { + Give_Frags_Out (attacker, targ, -2, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + if (deathmsg == DMSG_LASERCANNON) + bprint (PRINT_MEDIUM, " cuts his own scrag in half!\n"); + else + bprint (PRINT_MEDIUM, " kills his own scrag!\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + if (deathmsg == DMSG_LASERCANNON) + bprint (PRINT_MEDIUM, " blasts the friendly scrag "); + else + bprint (PRINT_MEDIUM, " mows down the friendly scrag "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + if (deathmsg == DMSG_LASERCANNON) { + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " cuts "); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag in several parts\n"); + } else { + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was killed by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, "\n"); + } + + MonsterKill (attacker); // adds knife kill to warlock if needed + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Army = +{ + custom_demon_name (attacker); + GetRank (attacker); + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") mows down the friendly scrag "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is killed by "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Demon1 = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") eviscerates the friendly scrag "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is returned to hell by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Shambler = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, "The shambler "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") annihilates the friendly scrag "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", learns a lesson from the shambler "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Wizard_by_Wizard = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") annihilates the colleague "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s scrag, "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, ", shows to "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ") who is the best\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1 = +{ + custom_demon_name (targ); //CH + + if (attacker.classname == "building_tesla") + Obit_Monster_Demon1_by_Tesla (targ, attacker); + else if (attacker.classname == "building_sentry") + Obit_Monster_Demon1_by_Sentry (targ, attacker); + else if (attacker.classname == "player") + Obit_Monster_Demon1_by_Player (targ, attacker); + else if (attacker.classname == "monster_army") + Obit_Monster_Demon1_by_Army (targ, attacker); + else if (attacker.classname == "monster_demon1") + Obit_Monster_Demon1_by_Demon1 (targ, attacker); + else if (attacker.classname == "monster_shambler") + Obit_Monster_Demon1_by_Shambler (targ, attacker); + else if (attacker.classname == "monster_wizard") + Obit_Monster_Demon1_by_Wizard (targ, attacker); + else + Obit_Monster_Misc (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Tesla = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Sentry = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was pulped by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was pulped by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Player = +{ + if (teamplay + && (attacker.team_no > 0) + && (self.real_owner.team_no > 0)) { + if (Teammate (targ.real_owner.team_no, attacker.team_no)) { + if (attacker == self.real_owner) { + Give_Frags_Out (attacker, targ, -2, 0, 1, 1, 0); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " kills his own fiend!\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " mows down the friendly demon "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was killed by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, "\n"); + + MonsterKill (attacker); // adds knife kills to warlock + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Army = +{ + custom_demon_name (attacker); + GetRank (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") mows down the friendly demon "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", didn't have a prayer against "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Demon1 = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") eviscerates the friendly demon "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", realises too late that "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") wasn't just trying to be friendly\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Shambler = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") annihilates the friendly demon "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is given a firm farewell to the netherworld by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Demon1_by_Wizard = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") kills the friendly demon "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s demon, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is killed by the scrag "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army = +{ + custom_demon_name (targ); //CH + GetRank (targ); + + if (attacker.classname == "building_tesla") + Obit_Monster_Army_by_Tesla (targ, attacker); + else if (attacker.classname == "building_sentry") + Obit_Monster_Army_by_Sentry (targ, attacker); + else if (attacker.classname == "player") + Obit_Monster_Army_by_Player (targ, attacker); + else if (attacker.classname == "monster_shambler") + Obit_Monster_Army_by_Shambler (targ, attacker); + else if (attacker.classname == "monster_demon1") + Obit_Monster_Army_by_Demon1 (targ, attacker); + else if (attacker.classname == "monster_army") + Obit_Monster_Army_by_Army (targ, attacker); + else if (attacker.classname == "monster_wizard") + Obit_Monster_Army_by_Wizard (targ, attacker); + else + Obit_Monster_Misc (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Tesla = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s mercenary soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was shocked to death by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Sentry = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s mercenary soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", discovers "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry isn't that easy to kill\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", should have known better than to cross "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun's line of fire\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Player = +{ + if (teamplay + && (attacker.team_no > 0) + && (self.real_owner.team_no > 0)) { + if (Teammate (targ.real_owner.team_no, attacker.team_no)) { + if (attacker == self.real_owner) { + Give_Frags_Out (attacker, targ, -2, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " kills his own soldier!\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " mows down the friendly soldier "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s mercenary soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was killed by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, "\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Shambler = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") slaps the friendly soldier "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ") into oblivion\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is smacked down by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Demon1 = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") disembowels the friendly soldier "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is now listed as KIA thanks to "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Army = +{ + custom_demon_name (attacker); + GetRank (attacker); + + if (targ == attacker) { //- OfN - It *may* happen + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s soldier, "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, ", explodes with his own rockets!\n"); + return; + } + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") mows down comrade-in-arms "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", takes a bullet in the chest from "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Army_by_Wizard = +{ + custom_demon_name (attacker); + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, "The scrag "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") kills the friendly soldier "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s soldier, "); + bprint (PRINT_MEDIUM, targ.undercover_name); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is killed by the scrag "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler = +{ + custom_demon_name (targ); //CH + + if (attacker.classname == "building_tesla") + Obit_Monster_Shambler_by_Tesla (targ, attacker); + else if (attacker.classname == "building_sentry") + Obit_Monster_Shambler_by_Sentry (targ, attacker); + else if (attacker.classname == "player") + Obit_Monster_Shambler_by_Player (targ, attacker); + else if (attacker.classname == "monster_demon1") + Obit_Monster_Shambler_by_Demon1 (targ, attacker); + else if (attacker.classname == "monster_shambler") + Obit_Monster_Shambler_by_Shambler (targ, attacker); + else if (attacker.classname == "monster_army") + Obit_Monster_Shambler_by_Army (targ, attacker); + else if (attacker.classname == "monster_wizard") + Obit_Monster_Shambler_by_Wizard (targ, attacker); + else + Obit_Monster_Misc (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Tesla = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was given a shocking surprise by "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", shouldn't play so close to "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Sentry = +{ + if (teamplay + && (attacker.real_owner.team_no > 0) + && (targ.real_owner.team_no > 0)) { + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", really needs to learn to dodge "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 2, 0, 0); //Sentry + Give_Frags_Out (attacker.real_owner, targ, -1, 0, 1, 1, 0); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s friendly shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", shouldn't play so close to "); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s sentry gun\n"); + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Player = +{ + if (teamplay + && (attacker.team_no > 0) + && (self.real_owner.team_no > 0)) { + if (Teammate (targ.real_owner.team_no, attacker.team_no)) { + if (attacker == self.real_owner) { + Give_Frags_Out (attacker, targ, -2, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " kills his own shambler!\n"); + } else { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " mows down the friendly shambler "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", was felled by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, "\n"); + + MonsterKill (attacker); // adds knife kills to warlock + } + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Demon1 = +{ + custom_demon_name (attacker); + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") checks its aura after killing "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", is torn apart by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Shambler = +{ + custom_demon_name (attacker); + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") electrifies the friendly shambler "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s shambler, "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, ", finds losing against shambler "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") to be a fatal experience\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Army = +{ + custom_demon_name (attacker); + GetRank (attacker); + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ") is caught in the crossfire from "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") proves to "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ") that size doesn't matter\n"); + } +}; + +void (entity targ, entity attacker) Obit_Monster_Shambler_by_Wizard = +{ + custom_demon_name (attacker); + + if (Teammate (targ.real_owner.team_no, attacker.real_owner.team_no)) { + Give_Frags_Out (attacker, targ, -1, 0, 1, 1, 0); + + //bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, "The scrag "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ") kills the friendly soldier "); + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } else { + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + + bprint (PRINT_MEDIUM, targ.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, ") had his army career truncated by the scrag "); + //bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + } +}; + +void (entity targ, entity attacker) Obit_Building = +{ + if (targ == attacker) + Obit_Building_by_Self (targ, attacker); + else if (attacker.classname == "building_tesla") + Obit_Building_by_Tesla (targ, attacker); + else if (attacker.classname == "teledeath") + Obit_Building_by_Teledeath (targ, attacker); + else if (attacker.classname == "player") + Obit_Building_by_Player (targ, attacker); + else if (attacker.classname == "monster_army") + Obit_Building_by_Army (targ, attacker); +}; + +void (entity targ, entity attacker) Obit_Building_by_Tesla = +{ + local string deathstring; + + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no) + && (targ.classname == "building_sentrygun" + || targ.classname == "building_tesla")) { + Give_Frags_Out (attacker, targ, 1, 0, 2, 0, 0); //Tesla + Give_Frags_Out (attacker.real_owner, targ, 1, 0, 1, 1, 0); + } + + if (targ.classname == "building_dispenser") + deathstring = "'s dispenser was zapped by "; + else if (targ.classname == "building_sentrygun") + deathstring = "'s sentrygun was no match for "; + else if (targ.classname == "building_camera") + deathstring = "'s security camera was vaporized by "; + else if (targ.classname == "building_sensor") + deathstring = "'s motion sensor was obliterated by "; + else if (targ.classname == "building_teleporter") + deathstring = "'s teleporter pad was short circuted by "; + else if (targ.classname == "building_tesla") + deathstring = "'s tesla sentry lost the battle against "; + else if (targ.classname == "building_sensor") + deathstring = "'s motion sensor was fucked up by "; + else if (targ.classname == "building_fieldgen") + deathstring = "'s field generator was destroyed by "; + else + deathstring = "'s unknown building (BUG) "; + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, deathstring); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, "'s tesla sentry\n"); +}; + +void (entity targ, entity attacker) Obit_Building_by_Self = +{ + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s "); + bprint (PRINT_MEDIUM, GetBuildingName (targ)); + bprint (PRINT_MEDIUM, " destroys itself.\n"); +}; + +void (entity targ, entity attacker) Obit_Building_by_Teledeath = +{ + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s "); + bprint (PRINT_MEDIUM, GetBuildingName (targ)); + bprint (PRINT_MEDIUM, " was telefragged by "); + bprint (PRINT_MEDIUM, attacker.owner.netname); + bprint (PRINT_MEDIUM, "\n"); +}; + +void (entity targ, entity attacker) Obit_Building_by_Player = +{ + if (attacker == targ.real_owner) { + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, " destroys his "); + bprint (PRINT_MEDIUM, GetBuildingName (targ)); + bprint (PRINT_MEDIUM, "\n"); + return; + } else { + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s "); + bprint (PRINT_MEDIUM, GetBuildingName (targ)); + bprint (PRINT_MEDIUM, " was destroyed by "); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, "\n"); + + if (!Teammate (targ.real_owner.team_no, attacker.team_no) + && (targ.classname == "building_sentrygun" + || targ.classname == "building_tesla")) + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); + } +}; + +void (entity targ, entity attacker) Obit_Building_by_Army = +{ + custom_demon_name (attacker); + GetRank (attacker); + + bprint (PRINT_MEDIUM, targ.real_owner.netname); + bprint (PRINT_MEDIUM, "'s "); + bprint (PRINT_MEDIUM, GetBuildingName (targ)); + bprint (PRINT_MEDIUM, " was destroyed by "); + bprint (PRINT_MEDIUM, attacker.undercover_name); + bprint (PRINT_MEDIUM, attacker.netname); + bprint (PRINT_MEDIUM, " ("); + bprint (PRINT_MEDIUM, attacker.real_owner.netname); + bprint (PRINT_MEDIUM, ")\n"); + + if (!Teammate (targ.real_owner.team_no, attacker.real_owner.team_no) + && (targ.classname == "building_sentrygun" + || targ.classname == "building_tesla")) + Give_Frags_Out (attacker, targ, 1, 0, 1, 1, 0); +}; + +void (entity targ, entity attacker) Obit_Monster_Misc = +{ + local string deathstring; + + if (attacker.classname == "explo_box") + deathstring = " blew up\n"; + else if (attacker.solid == SOLID_BSP && attacker != world) + deathstring = " was squished\n"; + else if (attacker.classname == "trap_shooter" + || attacker.classname == "trap_spikeshooter" + || attacker.classname == "trap_tf_spikeshooter" + || attacker.classname == "trap_tf_shooter") { + if (attacker.deathtype) + deathstring = attacker.deathtype; + else if (attacker.spawnflags == SPAWNFLAG_LASER) + deathstring = " had surgery from a laser\n"; + else if (attacker.spawnflags == SPAWNFLAG_TFROCKET) + deathstring = " took a ride on a rocket\n"; + else if (attacker.spawnflags == SPAWNFLAG_TFGRENADE) + deathstring = " tried to eat a wild pineapple\n"; + else if (attacker.spawnflags == SPAWNFLAG_TFFLAME) + deathstring = " was burned alive\n"; + else if (attacker.spawnflags == SPAWNFLAG_SUPERSPIKE) + deathstring = " was nailed to the ground\n"; + else + deathstring = " was spiked\n"; + } else if (attacker.classname == "fireball") + deathstring = " ate a lavaball\n"; + else if (attacker.classname == "teledeath") + deathstring = " was telefragged by " + attacker.owner.netname + "\n"; + else + deathstring = " dies\n"; + + bprint (PRINT_HIGH, "The "); + bprint (PRINT_HIGH, GetMonsterName (targ)); + bprint (PRINT_HIGH, " "); + bprint (PRINT_HIGH, targ.netname); + bprint (PRINT_HIGH, " ("); + bprint (PRINT_HIGH, targ.real_owner.netname); + bprint (PRINT_HIGH, ")"); + bprint (PRINT_HIGH, deathstring); }; diff --git a/ofndefs.qh b/ofndefs.qh index 2ccc79e..33972f2 100644 --- a/ofndefs.qh +++ b/ofndefs.qh @@ -6,12 +6,12 @@ =========================================================*/ //#define VERBOSE_GRUNTY -//#define WARLOCK_TEST // free summon -//#define ARMY_TEST // only 5 seconds for tele the soldier +#define WARLOCK_TEST // free summon +#define ARMY_TEST // only 5 seconds for tele the soldier //- attack owner? -//#define MAD_GRUNTY //for testing purposes -//#define MAD_MONSTERS // for testing +#define MAD_GRUNTY //for testing purposes +#define MAD_MONSTERS // for testing //#define MAD_TESLA // for testing //#define GRUNTY_EXTRA_WEAPONS WEAP_ROCKET_LAUNCHER | WEAP_SUPER_SHOTGUN // 0 diff --git a/often.qc b/often.qc index 7e634ab..4d57b67 100644 --- a/often.qc +++ b/often.qc @@ -697,22 +697,22 @@ void(entity themonster) KillTheMonster = string(entity thebuilding) GetBuildingName = { - if (thebuilding.classname == "building_dispenser") - return "dispenser"; - if (thebuilding.classname == "building_sentrygun") - return "sentry gun"; - if (thebuilding.classname == "building_tesla") - return "tesla sentry"; - if (thebuilding.classname == "building_sensor") - return "motion sensor"; - if (thebuilding.classname == "building_camera") - return "security camera"; - if (thebuilding.classname == "building_teleporter") - return "teleporter"; - if (thebuilding.classname == "building_fieldgen") - return "field generator"; - - return "unknown stuff"; + if (thebuilding.classname == "building_dispenser") + return "dispenser"; + else if (thebuilding.classname == "building_sentrygun") + return "sentry gun"; + else if (thebuilding.classname == "building_tesla") + return "tesla sentry"; + else if (thebuilding.classname == "building_sensor") + return "motion sensor"; + else if (thebuilding.classname == "building_camera") + return "security camera"; + else if (thebuilding.classname == "building_teleporter") + return "teleporter pad"; + else if (thebuilding.classname == "building_fieldgen") + return "field generator"; + else + return "unknown building (BUG)"; }; // soldiers don't target unoffensive buildings, or cloaked teslas! diff --git a/weapons.qc b/weapons.qc index fd7e40b..1493a53 100644 --- a/weapons.qc +++ b/weapons.qc @@ -1198,9 +1198,8 @@ void(float shotcount, vector dir, vector spread) FireBullets = { local vector direction; local vector src; - -// makevectors (self.v_angle); // umm, shouldn't this be dir? - makevectors (dir); + + makevectors (self.v_angle); src = self.origin + v_forward * 10; src_z = self.absmin_z + self.size_z * 0.7; @@ -1213,10 +1212,7 @@ void(float shotcount, vector dir, vector spread) FireBullets = direction += AVG (crandom(), crandom()) * spread_x * v_right; direction += AVG (crandom(), crandom()) * spread_y * v_up; - if (self.current_weapon & WEAP_ASSAULT_CANNON) - traceline (src, src + direction * 2048, FALSE, self); //WK 2048 - else - traceline (src, src + direction * 2024, FALSE, self); //WK 2048A + traceline (src, src + direction * 2048, FALSE, self); if (trace_fraction == 1.0) TraceAttack (0, direction); @@ -1290,7 +1286,8 @@ void() W_FireSuperShotgun = dir = normalize (dir - self.origin); } deathmsg = DMSG_SSHOTGUN; - FireBullets (12, dir, '0.05 0.05 0'); //WK 14, 0.14, 0.08 + FireBullets (6, dir, '0.05 0.05 0'); //WK 14, 0.14, 0.08 + FireBullets (6, dir, '0.05 0.05 0'); }; @@ -1515,12 +1512,12 @@ void() W_FireAssaultCannon = self.currentammo = self.ammo_shells = self.ammo_shells - 1; dir = aim (self, 100000); deathmsg = DMSG_ASSAULTCANNON; - //WK FireBullets (5, dir, '0.1 0.1 0'); + FireBullets (5, dir, '0.15 0.10 0'); //We want more of a cone of fire... // FireBullets (5, dir, '0.2 0.1 0'); // FireBullets (5, dir, '0.4 0.1 0'); - FireBullets (7, dir, '0.16 0.12 0'); - FireBullets (3, dir, '0.12 0.09 0'); +// FireBullets (7, dir, '0.16 0.12 0'); +// FireBullets (3, dir, '0.12 0.09 0'); }; /*