From: FruitieX Date: Tue, 8 Jun 2010 14:12:42 +0000 (+0300) Subject: centerprints X-Git-Tag: xonotic-v0.1.0preview~541^2~101 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=0db0942ab3a4f3837a57f6a131ee7bd4ca00f538 centerprints --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 3b892ef9b9..a21bea9859 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1250,7 +1250,7 @@ void Net_Notify() { } else if(type == CSQC_CENTERPRINT) { - HUD_Centerprint(ReadString(), ReadByte()); + HUD_Centerprint(ReadString(), ReadShort(), ReadByte()); } } diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 6f4aadffd8..daf257d476 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2300,45 +2300,88 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) #define DAMAGE_CENTERPRINT_SPACER NEWLINES -void HUD_Centerprint(string s1, float type) +void HUD_Centerprint(string s1, float type, float msg) { - if (type == DEATH_TEAMCHANGE) { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1)); - } else if (type == DEATH_AUTOTEAMCHANGE) { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You have been moved into a different team to improve team balance\nYou are now on: ", s1)); - } else if (type == DEATH_CAMP) { - if(cvar("cl_gentle")) - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Reconsider your tactics, camper!")); - else - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Die camper!")); - } else if (type == DEATH_NOAMMO) { - if(cvar("cl_gentle")) - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You are reinserted into the game for running out of ammo...")); - else - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were killed for running out of ammo...")); - } else if (type == DEATH_ROT) { - if(cvar("cl_gentle")) - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to preserve your health")); - else - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You grew too old without taking your medicine")); - } else if (type == DEATH_MIRRORDAMAGE) { - if(cvar("cl_gentle")) - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't go against team mates!")); - else - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't shoot your team mates!")); - } else if (type == DEATH_QUIET) { - // do nothing - } else if (type == DEATH_KILL) { - if(cvar("cl_gentle")) - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to be more careful!")); - else - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You killed your own dumb self!")); - } else if (type == KILL_TEAM) { - if(cvar("cl_gentle")) { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You went against a team mate!")); - } else { - centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You fragged ", s1, ", a team mate!")); + if(msg == MSG_SUICIDE) { + if (type == DEATH_TEAMCHANGE) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1)); + } else if (type == DEATH_AUTOTEAMCHANGE) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You have been moved into a different team to improve team balance\nYou are now on: ", s1)); + } else if (type == DEATH_CAMP) { + if(cvar("cl_gentle")) + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Reconsider your tactics, camper!")); + else + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Die camper!")); + } else if (type == DEATH_NOAMMO) { + if(cvar("cl_gentle")) + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You are reinserted into the game for running out of ammo...")); + else + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were killed for running out of ammo...")); + } else if (type == DEATH_ROT) { + if(cvar("cl_gentle")) + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to preserve your health")); + else + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You grew too old without taking your medicine")); + } else if (type == DEATH_MIRRORDAMAGE) { + if(cvar("cl_gentle")) + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't go against team mates!")); + else + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't shoot your team mates!")); + } else if (type == DEATH_QUIET) { + // do nothing + } else if (type == DEATH_KILL) { + if(cvar("cl_gentle")) + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to be more careful!")); + else + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You killed your own dumb self!")); + } + } else if(msg == MSG_KILL) { + if (type == KILL_TEAM) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You went against a team mate!")); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You fragged ", s1, ", a team mate!")); + } + } else if (type == KILL_FIRST_BLOOD) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First score")); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First blood")); + } + } else if (type == KILL_FIRST_VICTIM) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First casualty")); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1First victim")); + } + } else if (type == KILL_TYPEFRAG) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You scored against ^7", s1, "^7 who was typing!")); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You typefragged ^7", s1)); + } + } else if (type == KILL_TYPEFRAGGED) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were scored against by ^7", s1, "^7 while you were typing!")); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were typefragged by ^7", s1)); + } + } else if (type == KILL_FRAG) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You scored against ^7", s1)); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You fragged ^7", s1)); + } + } else if (type == KILL_FRAGGED) { + if(cvar("cl_gentle")) { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You were scored against by ^7", s1)); + } else { + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^4You were fragged by ^7", s1)); + } } + } else if(msg == MSG_KILL_ACTION) { + // TODO: invent more centerprints here? + centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "^1Watch your step!", s1)); } } diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 538383b4fe..c544370704 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -259,14 +259,18 @@ void Send_KillNotification (string s1, string s2, string s3, float msg, float ty // TODO: writespectatable? // Function is used to send a generic centerprint whose content CSQC gets to decide (gentle version or not in the below cases) -void Send_CSQC_Centerprint(entity e, string s1, float deathtype) +void Send_CSQC_Centerprint(entity e, string s1, float msg, float type) { - msg_entity = e; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_NOTIFY); - WriteByte(MSG_ONE, CSQC_CENTERPRINT); - WriteString(MSG_ONE, s1); - WriteByte(MSG_ONE, deathtype); + if (clienttype(e) == CLIENTTYPE_REAL) + { + msg_entity = e; + WriteByte(MSG_ONE, SVC_TEMPENTITY); + WriteByte(MSG_ONE, TE_CSQC_NOTIFY); + WriteByte(MSG_ONE, CSQC_CENTERPRINT); + WriteString(MSG_ONE, s1); + WriteShort(MSG_ONE, msg); + WriteByte(MSG_ONE, type); + } } void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) @@ -287,80 +291,17 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) { if (deathtype == DEATH_TEAMCHANGE || deathtype == DEATH_AUTOTEAMCHANGE) msg = ColoredTeamName(targ.team); // TODO: check if needed? - /* - if (deathtype == DEATH_TEAMCHANGE) { - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", ColoredTeamName(targ.team))); - } else if (deathtype == DEATH_AUTOTEAMCHANGE) { - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "You have been moved into a different team to improve team balance\nYou are now on: ", ColoredTeamName(targ.team))); - return; - } else if (deathtype == DEATH_CAMP) { - if(sv_gentle) - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Reconsider your tactics, camper!")); - else - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Die camper!")); - } else if (deathtype == DEATH_NOAMMO) { - if(sv_gentle) - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You are reinserted into the game for running out of ammo...")); - else - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You were killed for running out of ammo...")); - } else if (deathtype == DEATH_ROT) { - if(sv_gentle) - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to preserve your health")); - else - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You grew too old without taking your medicine")); - } else if (deathtype == DEATH_MIRRORDAMAGE) { - if(sv_gentle) - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't go against team mates!")); - else - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Don't shoot your team mates!")); - } else if (deathtype == DEATH_QUIET) { - // do nothing - } else { - if(sv_gentle) - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You need to be more careful!")); - else - centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You killed your own dumb self!")); - } - */ - Send_CSQC_Centerprint(targ, msg, deathtype); + Send_CSQC_Centerprint(targ, msg, deathtype, MSG_SUICIDE); - // TODO: message + if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET) + { + LogDeath("suicide", deathtype, targ, targ); + GiveFrags(attacker, targ, -1); + } + // TODO: hmm? /* - if(sv_gentle) { - if (deathtype == DEATH_CAMP) - bprint ("^1",s, "^1 thought they found a nice camping ground\n"); - else if (deathtype == DEATH_MIRRORDAMAGE) - bprint ("^1",s, "^1 didn't become friends with the Lord of Teamplay\n"); - else - bprint ("^1",s, "^1 will be reinserted into the game due to their own actions\n"); - - if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET) - { - LogDeath("suicide", deathtype, targ, targ); - GiveFrags(attacker, targ, -1); - } if (targ.killcount > 2) bprint ("^1",s,"^1 faded after a ",ftos(targ.killcount)," point spree\n"); - } else { - else if (deathtype == DEATH_KILL) - bprint ("^1",s, "^1 couldn't take it anymore\n"); - else if (deathtype == DEATH_ROT) - bprint ("^1",s, "^1 died\n"); - else if (deathtype == DEATH_NOAMMO) - bprint ("^7",s, "^7 committed suicide. What's the point of living without ammo?\n"); - else if (deathtype == DEATH_CAMP) - bprint ("^1",s, "^1 thought they found a nice camping ground\n"); - else if (deathtype == DEATH_MIRRORDAMAGE) - bprint ("^1",s, "^1 didn't become friends with the Lord of Teamplay\n"); - else if (deathtype == DEATH_CHEAT) - bprint ("^1",s, "^1 unfairly eliminated themself\n"); - else if (deathtype == DEATH_FIRE) - bprint ("^1",s, "^1 burned to death\n"); - else if (deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET) - bprint ("^1",s, "^1 couldn't resist the urge to self-destruct\n"); - - bprint ("^1",s,"^1 ended it all after a ",ftos(targ.killcount)," kill spree\n"); - } */ // TODO: wut is this? @@ -380,31 +321,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) if(teams_matter && attacker.team == targ.team) { type = KILL_TEAM; - /* - if(sv_gentle) { - // TODO: the centerprint! - centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You went against a team mate!")); - bprint ("^1", a, "^1 took action against a team mate\n"); - } else { - centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Moron! You fragged ", s, ", a team mate!")); - bprint ("^1", a, "^1 mows down a team mate\n"); - } - */ + GiveFrags(attacker, targ, -1); - /* - if (targ.killcount > 2) { - if(sv_gentle) - bprint ("^1",s,"'s ^1",ftos(targ.killcount)," scoring spree was ended by a team mate!\n"); - else - bprint ("^1",s,"'s ^1",ftos(targ.killcount)," kill spree was ended by a team mate!\n"); - } - if (attacker.killcount > 2) { - if(sv_gentle) - bprint ("^1",a,"^1 ended a ",ftos(attacker.killcount)," scoring spree by going against a team mate\n"); - else - bprint ("^1",a,"^1 ended a ",ftos(attacker.killcount)," kill spree by killing a team mate\n"); - } - */ if (targ.killcount > 2) { msg = ftos(targ.killcount); @@ -418,7 +336,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) attacker.killcount = 0; LogDeath("tk", deathtype, attacker, targ); - Send_CSQC_Centerprint(attacker, s, MSG_KILL); + Send_CSQC_Centerprint(attacker, s, type, MSG_KILL); Send_KillNotification(a, msg, "", type, MSG_KILL); } else @@ -428,102 +346,28 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) { checkrules_firstblood = TRUE; Send_KillNotification(a, "", "", KILL_FIRST_BLOOD, MSG_KILL); - //bprint("^1",a, "^1 drew first blood", "\n"); // TODO: make these print at newline if they dont - Send_CSQC_Centerprint(attacker, "", KILL_FIRST_BLOOD); - Send_CSQC_Centerprint(targ, "", KILL_FIRST_VICTIM); - //blood_message = "^1First blood\n"; - //victim_message = "^1First victim\n"; // or First casualty + Send_CSQC_Centerprint(attacker, "", KILL_FIRST_BLOOD, MSG_KILL); + Send_CSQC_Centerprint(targ, "", KILL_FIRST_VICTIM, MSG_KILL); } - //if(sv_gentle > 0) { - // centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You scored against ^7", s, GetAdvancedDeathReports(targ))); - // centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, a,"^1 scored against you ^7", GetAdvancedDeathReports(attacker))); if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) { - Send_CSQC_Centerprint(attacker, s, KILL_TYPEFRAG); - //centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typefragged ^7", s, GetAdvancedDeathReports(targ))); - Send_CSQC_Centerprint(targ, a, KILL_TYPEFRAGGED); - //centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typefragged by ^7", a, GetAdvancedDeathReports(attacker))); + Send_CSQC_Centerprint(attacker, s, KILL_TYPEFRAG, MSG_KILL); + Send_CSQC_Centerprint(targ, a, KILL_TYPEFRAGGED, MSG_KILL); } else { - Send_CSQC_Centerprint(attacker, s, KILL_FRAG); - //centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You fragged ^7", s, GetAdvancedDeathReports(targ))); - Send_CSQC_Centerprint(targ, a, KILL_FRAGGED); - //centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were fragged by ^7", a, GetAdvancedDeathReports(attacker))); + Send_CSQC_Centerprint(attacker, s, KILL_FRAG, MSG_KILL); + Send_CSQC_Centerprint(targ, a, KILL_FRAGGED, MSG_KILL); } attacker.taunt_soundtime = time + 1; - // TODO: more msg - //if(sv_gentle) { - // bprint ("^1",s, "^1 needs a restart thanks to ", a, "\n"); - //} else { - /* - w = DEATH_WEAPONOF(deathtype); - if(WEP_VALID(w)) - { - w_deathtypestring = "was blasted by"; - w_deathtype = deathtype; - weapon_action(w, WR_KILLMESSAGE); - p = strstrofs(w_deathtypestring, "#", 0); - if(p < 0) - bprint("^1", s, "^1 ", w_deathtypestring, " ", a, "\n"); - else - bprint("^1", s, "^1 ", substring(w_deathtypestring, 0, p), a, "^1", substring(w_deathtypestring, p+1, strlen(w_deathtypestring) - (p+1)), "\n"); - } - else if (deathtype == DEATH_TELEFRAG) - bprint ("^1",s, "^1 was telefragged by ", a, "\n"); - else if (deathtype == DEATH_DROWN) - bprint ("^1",s, "^1 was drowned by ", a, "\n"); - else if (deathtype == DEATH_SLIME) - bprint ("^1",s, "^1 was slimed by ", a, "\n"); - else if (deathtype == DEATH_LAVA) - bprint ("^1",s, "^1 was cooked by ", a, "\n"); - else if (deathtype == DEATH_FALL) - bprint ("^1",s, "^1 was grounded by ", a, "\n"); - else if (deathtype == DEATH_SHOOTING_STAR) - bprint ("^1",s, "^1 was shot into space by ", a, "\n"); - else if (deathtype == DEATH_SWAMP) - bprint ("^1",s, "^1 was conserved by ", a, "\n"); - else if(deathtype == DEATH_SBCRUSH) - bprint ("^1",s, "^1 was crushed by ^1", a, "\n"); - else if(deathtype == DEATH_SBMINIGUN) - bprint ("^1",s, "^1 got shredded by ^1", a, "\n"); - else if(deathtype == DEATH_SBROCKET) - bprint ("^1",s, "^1 was blased to bits by ^1", a, "\n"); - else if(deathtype == DEATH_SBBLOWUP) - [ - bprint ("^1",s, "^1 got cought in the destruction of ^1", a, "'s vehicle\n"); - - else if(deathtype == DEATH_WAKIGUN) - bprint ("^1",s, "^1 was bolted down by ^1", a, "\n"); - else if(deathtype == DEATH_WAKIROCKET) - bprint ("^1",s, "^1 could find no shelter from ^1", a, "'s rockets\n"); - else if(deathtype == DEATH_WAKIBLOWUP) - bprint ("^1",s, "^1 dies when ^1", a, "'s wakizashi dies.\n"); - - else if(deathtype == DEATH_TURRET) - bprint ("^1",s, "^1 was pushed into the line of fire by ^1", a, "\n"); - else if(deathtype == DEATH_TOUCHEXPLODE) - bprint ("^1",s, "^1 was pushed into an accident by ^1", a, "\n"); - else if(deathtype == DEATH_CHEAT) - bprint ("^1",s, "^1 was unfairly eliminated by ^1", a, "\n"); - else if (deathtype == DEATH_FIRE) - bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n"); - else if (deathtype == DEATH_CUSTOM) - bprint ("^1",s, "^1 ", deathmessage, " by ^1", a, "\n"); - else - bprint ("^1",s, "^1 was fragged by ", a, "\n"); - */ - - //w = DEATH_WEAPONOF(deathtype); - + // TODO: fix this? if (deathtype == DEATH_CUSTOM) msg = strcat(deathmessage, " by ^1", msg); else if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "") { - msg = strstrofs(inflictor.message2, "#", 0); + msg = ftos(strstrofs(inflictor.message2, "#", 0)); } Send_KillNotification(s, a, msg, deathtype, MSG_KILL); - //} if(g_ctf && targ.flagcarried) { @@ -535,24 +379,12 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) GiveFrags(attacker, targ, 1); if (targ.killcount > 2) { - /* - if(sv_gentle) - bprint ("^1",s,"'s ^1", ftos(targ.killcount), " scoring spree was ended by ", a, "\n"); - else - bprint ("^1",s,"'s ^1", ftos(targ.killcount), " kill spree was ended by ", a, "\n"); - */ Send_KillNotification(s, ftos(targ.killcount), a, KILL_END_SPREE, MSG_SPREE); } attacker.killcount = attacker.killcount + 1; if (attacker.killcount > 2) { - /* - if(sv_gentle) - bprint ("^1",a,"^1 made ",ftos(attacker.killcount)," scores in a row\n"); - else - bprint ("^1",a,"^1 has ",ftos(attacker.killcount)," frags in a row\n"); - */ Send_KillNotification(a, ftos(attacker.killcount), "", KILL_SPREE, MSG_SPREE); } @@ -560,84 +392,36 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) if (attacker.killcount == 3) { - //if(sv_gentle) { - // bprint (a,"^7 made a ^1TRIPLE SCORE\n"); - //} else { - // bprint (a,"^7 made a ^1TRIPLE FRAG\n"); - // Send_KillNotification(a, "", "", KILL_SPREE_3, MSG_SPREE); AnnounceTo(attacker, "03kills"); - - //} } else if (attacker.killcount == 5) { - //if(sv_gentle) { - // bprint (a,"^7 unleashes ^1SCORING RAGE\n"); - //} else { - // bprint (a,"^7 unleashes ^1RAGE\n"); Send_KillNotification(a, "", "", KILL_SPREE_5, MSG_SPREE); AnnounceTo(attacker, "05kills"); - //} } else if (attacker.killcount == 10) { - //if(sv_gentle) { - // bprint (a,"^7 made ^1TEN SCORES IN A ROW!\n"); - //} else { - // bprint (a,"^7 starts the ^1MASSACRE!\n"); Send_KillNotification(a, "", "", KILL_SPREE_10, MSG_SPREE); AnnounceTo(attacker, "10kills"); - //} } else if (attacker.killcount == 15) { - /* - if(sv_gentle) { - bprint (a,"^7 made ^1FIFTEEN SCORES IN A ROW!\n"); - } else { - bprint (a,"^7 executes ^1MAYHEM!\n"); - AnnounceTo(attacker, "15kills"); - } - */ Send_KillNotification(a, "", "", KILL_SPREE_15, MSG_SPREE); AnnounceTo(attacker, "15kills"); } else if (attacker.killcount == 20) { - /* - if(sv_gentle) { - bprint (a,"^7 made ^1TWENTY SCORES IN A ROW!\n"); - } else { - bprint (a,"^7 is a ^1BERSERKER!\n"); - AnnounceTo(attacker, "20kills"); - } - */ Send_KillNotification(a, "", "", KILL_SPREE_20, MSG_SPREE); AnnounceTo(attacker, "20kills"); } else if (attacker.killcount == 25) { - /* - if(sv_gentle) { - bprint (a,"^7 made ^1TWENTY FIFE SCORES IN A ROW!\n"); - } else { - bprint (a,"^7 inflicts ^1CARNAGE!\n"); - AnnounceTo(attacker, "25kills"); - }*/ Send_KillNotification(a, "", "", KILL_SPREE_25, MSG_SPREE); AnnounceTo(attacker, "25kills"); } else if (attacker.killcount == 30) { - /* - if(sv_gentle) { - bprint (a,"^7 made ^1THIRTY SCORES IN A ROW!\n"); - } else { - bprint (a,"^7 unleashes ^1ARMAGEDDON!\n"); - AnnounceTo(attacker, "30kills"); - } - */ Send_KillNotification(a, "", "", KILL_SPREE_30, MSG_SPREE); AnnounceTo(attacker, "30kills"); } @@ -645,56 +429,12 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) } else { - //centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Watch your step!")); - Send_CSQC_Centerprint(targ, "", MSG_KILL_ACTION); + Send_CSQC_Centerprint(targ, "", deathtype, MSG_KILL_ACTION); if (deathtype == DEATH_HURTTRIGGER && inflictor.message != "") msg = inflictor.message; else if (deathtype == DEATH_CUSTOM) msg = deathmessage; - //bprint ("^1",s, "^1 ", inflictor.message, "\n"); - /*else if (deathtype == DEATH_DROWN) - if(sv_gentle) - bprint ("^1",s, "^1 was in the water for too long\n"); - else - bprint ("^1",s, "^1 drowned\n"); - else if (deathtype == DEATH_SLIME) - bprint ("^1",s, "^1 was slimed\n"); - else if (deathtype == DEATH_LAVA) - if(sv_gentle) - bprint ("^1",s, "^1 found a hot place\n"); - else - bprint ("^1",s, "^1 turned into hot slag\n"); - else if (deathtype == DEATH_FALL) - if(sv_gentle) - bprint ("^1",s, "^1 tested gravity (and it worked)\n"); - else - bprint ("^1",s, "^1 hit the ground with a crunch\n"); - else if (deathtype == DEATH_SHOOTING_STAR) - bprint ("^1",s, "^1 became a shooting star\n"); - else if (deathtype == DEATH_SWAMP) - if(sv_gentle) - bprint ("^1",s, "^1 discovered a swamp\n"); - else - bprint ("^1",s, "^1 is now conserved for centuries to come\n"); - else if(deathtype == DEATH_TURRET) - bprint ("^1",s, "^1 was mowed down by a turret \n"); - else if (deathtype == DEATH_CUSTOM) - bprint ("^1",s, "^1 ", deathmessage, "\n"); - else if(deathtype == DEATH_TOUCHEXPLODE) - bprint ("^1",s, "^1 died in an accident\n"); - else if(deathtype == DEATH_CHEAT) - bprint ("^1",s, "^1 was unfairly eliminated\n"); - else if(deathtype == DEATH_FIRE) - if(sv_gentle) - bprint ("^1",s, "^1 felt a little hot\n"); - else - bprint ("^1",s, "^1 burnt to death\n"); - else - if(sv_gentle) - bprint ("^1",s, "^1 needs a restart\n"); - else - bprint ("^1",s, "^1 died\n"); - */ + GiveFrags(targ, targ, -1); if(PlayerScore_Add(targ, SP_SCORE, 0) == -5) { AnnounceTo(targ, "botlike"); @@ -703,10 +443,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) if (targ.killcount > 2) Send_KillNotification(s, ftos(targ.killcount), "", 0, MSG_KILL_ACTION_SPREE); - //if(sv_gentle) - // bprint ("^1",s,"^1 needs a restart after a ",ftos(targ.killcount)," scoring spree\n"); - //else - // bprint ("^1",s,"^1 died with a ",ftos(targ.killcount)," kill spree\n"); LogDeath("accident", deathtype, targ, targ); }