]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'fruitiex/newpanelhud_stable' into fruitiex/newpanelhud
authorFruitieX <rasse@rasse-lappy.localdomain>
Mon, 7 Jun 2010 17:29:41 +0000 (20:29 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Mon, 7 Jun 2010 17:29:41 +0000 (20:29 +0300)
defaultXonotic.cfg
qcsrc/client/Main.qc
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/server/g_damage.qc

index 3f01cc88134a24ad6c3410221b938c4d33ec9b04..286eb4313fa094a24040b280338a950853156664 100644 (file)
@@ -1406,6 +1406,7 @@ seta hud_notify_bg_color_team "" "override panel color with team color in team b
 seta hud_notify_bg_alpha "" "if set to something else than \"\" = override default panel background alpha"
 seta hud_notify_bg_border "" "if set to something else than \"\" = override default size of border around the background"
 seta hud_notify_bg_padding "" "if set to something else than \"\" = override default padding of contents from border"
+seta hud_notify_print 0 "also con_notify print the messages that are shown on the notify panel"
 
 seta hud_timer 1 "enable/disable this panel"
 seta hud_timer_pos "-0.213725 0" "position of this base of the panel"
index 1d6b85d3bf228e6003a913db3193d8ec9b5e1f5d..6609e018dd09e0e4829f5fec88cbc8e034519ea2 100644 (file)
@@ -1240,6 +1240,20 @@ void Net_VoteDialogReset() {
        vote_active = 0;
 }
 
+void Net_Notify() {
+       float type;
+       type = ReadByte();
+
+       if(type == CSQC_KILLNOTIFY)
+       {
+               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadByte(), ReadByte());
+       }
+       else if(type == CSQC_CENTERPRINT)
+       {
+               HUD_Centerprint(ReadString(), ReadByte());
+       }
+}
+
 // CSQC_Parse_TempEntity : Handles all temporary entity network data in the CSQC layer.
 // You must ALWAYS first acquire the temporary ID, which is sent as a byte.
 // Return value should be 1 if CSQC handled the temporary entity, otherwise return 0 to have the engine process the event.
@@ -1306,6 +1320,10 @@ float CSQC_Parse_TempEntity()
                        announce_snd = strzone(ReadString());
                        bHandled = true;
                        break;
+               case TE_CSQC_NOTIFY:
+                       Net_Notify();
+                       bHandled = true;
+                       break;
                default:
                        // No special logic for this temporary entity; return 0 so the engine can handle it
                        bHandled = false;
index 962c95c4bd88420394b393ac4ca14e40059170dd..088424eab54984eb045f18bdc1aeb9a6e933c8a6 100644 (file)
@@ -1998,6 +1998,315 @@ void HUD_HealthArmor(void)
 // ___TODO___ !!!
 // Notification area (#4)
 //
+
+string Weapon_SuicideMessage(float id)
+{
+       switch (id)
+       {
+               case 1:
+                       return "lasered himself to hell";
+               case 2:
+                       return "did the impossible";
+               case 3:
+                       return "did the impossible";
+               case 4:
+                       if(id & HITTYPE_SECONDARY)
+                               return "tried out his own grenade";
+                       return "detonated";
+       }
+       // TODO: was blasted by?
+       return strcat("[no kill message for weapon ", ftos(id), "!]");
+}
+
+string Weapon_KillMessage(float id)
+{
+       switch (id)
+       {
+               case 1:
+                       return "was lasered to death by";
+               case 2:
+                       return "was gunned by";
+               case 3:
+                       if(id & HITTYPE_SECONDARY)
+                               return "was sniped by";
+                       return "was riddled full of holes by";
+               case 4:
+                       if(id & HITTYPE_BOUNCE)
+                               return "didn't see #'s grenade";
+                       return "almost dodged #'s grenade";
+       }
+       return strcat("[no suicide message for weapon ", ftos(id), "!]");
+}
+
+float killnotify_times[10];
+float killnotify_weapons[10];
+string killnotify_attackers[10];
+string killnotify_victims[10];
+void HUD_KillNotify_Push(string attacker, string victim, float wpn)
+{
+       float i;
+       for (i = 9; i > 0; --i) {
+               killnotify_times[i] = killnotify_times[i-1];
+               killnotify_weapons[i] = killnotify_weapons[i-1];
+               killnotify_attackers[i] = killnotify_attackers[i-1];
+               killnotify_victims[i] = killnotify_victims[i-1];
+       }
+       killnotify_times[0] = time;
+       killnotify_weapons[0] = wpn;
+       killnotify_attackers[0] = attacker;
+       killnotify_victims[0] = victim;
+}
+
+void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
+{
+       if(msg == MSG_SUICIDE) {
+               // TODO: cl_gentle
+               // TODO: way of finding out secondary?
+               if(type == DEATH_WEAPON) {
+                       HUD_KillNotify_Push(s1, "", stof(s3));
+                       if (!HUD_Panel_CheckActive(4) || cvar("hud_notify_print"))
+                               print("^1", s1, "^1 ", Weapon_SuicideMessage(stof(s2)), "\n");
+               }
+               else if (type == DEATH_KILL)
+                       print ("^1",s1, "^1 couldn't take it anymore\n");
+               else if (type == DEATH_ROT)
+                       print ("^1",s1, "^1 died\n");
+               else if (type == DEATH_NOAMMO)
+                       print ("^7",s1, "^7 committed suicide. What's the point of living without ammo?\n");
+               else if (type == DEATH_CAMP)
+                       print ("^1",s1, "^1 thought they found a nice camping ground\n");
+               else if (type == DEATH_MIRRORDAMAGE)
+                       print ("^1",s1, "^1 didn't become friends with the Lord of Teamplay\n");
+               else if (type == DEATH_CHEAT)
+                       print ("^1",s1, "^1 unfairly eliminated themself\n");
+               else if (type == DEATH_FIRE)
+                       print ("^1",s1, "^1 burned to death\n");
+               else if (type != DEATH_TEAMCHANGE && type != DEATH_QUIET)
+                       print ("^1",s1, "^1 couldn't resist the urge to self-destruct\n");
+               if (stof(s2) > 2) // killcount > 2
+                       print ("^1",s1,"^1 ended it all after a ",s2," kill spree\n");
+       } else if(msg == MSG_KILL) {
+               if(type == KILL_TEAM || type == KILL_TEAM_SPREE) {
+                               if(cvar("cl_gentle")) {
+                                       print ("^1", s1, "^1 took action against a team mate\n");
+                               } else {
+                                       print ("^1", s1, "^1 mows down a team mate\n");
+                               }
+                               if (stof(s2) > 2 && type == KILL_TEAM_SPREE) {
+                                       if(cvar("cl_gentle"))
+                                               print ("^1",s1,"^1 ended a ",s2," scoring spree by going against a team mate\n");
+                                       else
+                                               print ("^1",s1,"^1 ended a ",s2," kill spree by killing a team mate\n");
+                               }
+                               else if (stof(s2) > 2) {
+                                       if(cvar("cl_gentle"))
+                                               print ("^1",s1,"'s ^1",s2," scoring spree was ended by a team mate!\n");
+                                       else
+                                               print ("^1",s1,"'s ^1",s2," kill spree was ended by a team mate!\n");
+                               }
+               }
+               else if(type == KILL_FIRST_BLOOD)
+                       print("^1",s1, "^1 drew first blood", "\n");
+               else if (type == DEATH_WEAPON) {
+                       HUD_KillNotify_Push(s1, s2, stof(s3));
+                       if (!HUD_Panel_CheckActive(4) || cvar("hud_notify_print"))
+                               print("^1", s1, "^1 ", Weapon_KillMessage(stof(s3)), "\n");
+               }
+               else if (type == DEATH_TELEFRAG)
+                       print ("^1",s1, "^1 was telefragged by ", s2, "\n");
+               else if (type == DEATH_DROWN)
+                       print ("^1",s1, "^1 was drowned by ", s2, "\n");
+               else if (type == DEATH_SLIME)
+                       print ("^1",s1, "^1 was slimed by ", s2, "\n");
+               else if (type == DEATH_LAVA)
+                       print ("^1",s1, "^1 was cooked by ", s2, "\n");
+               else if (type == DEATH_FALL)
+                       print ("^1",s1, "^1 was grounded by ", s2, "\n");
+               else if (type == DEATH_SHOOTING_STAR)
+                       print ("^1",s1, "^1 was shot into space by ", s2, "\n");
+               else if (type == DEATH_SWAMP)
+                       print ("^1",s1, "^1 was conserved by ", s2, "\n");
+               // TODO
+               /*else if (type == DEATH_HURTTRIGGER && inflictor.msg2 != "")
+               {
+                       print("^1", s1, "^1 ", s2, "^1", s3, "\n");
+               }*/
+               else if(type == DEATH_SBCRUSH)
+                       print ("^1",s1, "^1 was crushed by ^1", s2, "\n");
+               else if(type == DEATH_SBMINIGUN)
+                       print ("^1",s1, "^1 got shredded by ^1", s2, "\n");
+               else if(type == DEATH_SBROCKET)
+                       print ("^1",s1, "^1 was blased to bits by ^1", s2, "\n");
+               else if(type == DEATH_SBBLOWUP)
+                       print ("^1",s1, "^1 got cought in the destruction of ^1", s2, "'s vehicle\n");
+
+               else if(type == DEATH_WAKIGUN)
+                       print ("^1",s1, "^1 was bolted down by ^1", s2, "\n");
+               else if(type == DEATH_WAKIROCKET)
+                       print ("^1",s1, "^1 could find no shelter from ^1", s2, "'s rockets\n");
+               else if(type == DEATH_WAKIBLOWUP)
+                       print ("^1",s1, "^1 dies when ^1", s2, "'s wakizashi dies.\n");
+
+               else if(type == DEATH_TURRET)
+                       print ("^1",s1, "^1 was pushed into the line of fire by ^1", s2, "\n");
+               else if(type == DEATH_TOUCHEXPLODE)
+                       print ("^1",s1, "^1 was pushed into an accident by ^1", s2, "\n");
+               else if(type == DEATH_CHEAT)
+                       print ("^1",s1, "^1 was unfairly eliminated by ^1", s2, "\n");
+               else if (type == DEATH_FIRE)
+                       print ("^1",s1, "^1 was burnt to death by ^1", s2, "\n");
+               else if (type == DEATH_CUSTOM)
+                       print ("^1",s1, "^1 ", s2, "\n");
+               else
+                       print ("^1",s1, "^1 was fragged by ", s2, "\n");
+       } else if(msg == MSG_SPREE) {
+               if(type == KILL_END_SPREE) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1,"'s ^1", s2, " scoring spree was ended by ", s3, "\n");
+                       else
+                               print ("^1",s1,"'s ^1", s2, " kill spree was ended by ", s3, "\n");
+               } else if(type == KILL_SPREE) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1,"^1 made ",s2," scores in a row\n");
+                       else
+                               print ("^1",s1,"^1 has ",s2," frags in a row\n");
+               } else if(type == KILL_SPREE_3) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made a ^1TRIPLE SCORE\n");
+                       else
+                               print (s1,"^7 made a ^1TRIPLE FRAG\n");
+               } else if(type == KILL_SPREE_5) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 unleashes ^1SCORING RAGE\n");
+                       else
+                               print (s1,"^7 unleashes ^1RAGE\n");
+               } else if(type == KILL_SPREE_10) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made ^1TEN SCORES IN A ROW!\n");
+                       else
+                               print (s1,"^7 starts the ^1MASSACRE!\n");
+               } else if(type == KILL_SPREE_15) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made ^1FIFTEEN SCORES IN A ROW!\n");
+                       else
+                               print (s1,"^7 executes ^1MAYHEM!\n");
+               } else if(type == KILL_SPREE_20) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made ^1TWENTY SCORES IN A ROW!\n");
+                       else
+                               print (s1,"^7 is a ^1BERSERKER!\n");
+               } else if(type == KILL_SPREE_25) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made ^1TWENTY FIFE SCORES IN A ROW!\n");
+                       else
+                               print (s1,"^7 inflicts ^1CARNAGE!\n");
+               } else if(type == KILL_SPREE_30) {
+                       if(cvar("cl_gentle"))
+                               print (s1,"^7 made ^1THIRTY SCORES IN A ROW!\n");
+                       else
+                               print (s1,"^7 unleashes ^1ARMAGEDDON!\n");
+               }
+       } else if(msg == MSG_KILL_ACTION) { // wtf is this? isnt it basically the same as MSG_SUICIDE?
+               if (type == DEATH_DROWN) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 was in the water for too long\n");
+                       else
+                               print ("^1",s1, "^1 drowned\n");
+               }
+               else if (type == DEATH_SLIME)
+                       print ("^1",s1, "^1 was slimed\n");
+               else if (type == DEATH_LAVA) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 found a hot place\n");
+                       else
+                               print ("^1",s1, "^1 turned into hot slag\n");
+               }
+               else if (type == DEATH_FALL) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 tested gravity (and it worked)\n");
+                       else
+                               print ("^1",s1, "^1 hit the ground with a crunch\n");
+               }
+               else if (type == DEATH_SHOOTING_STAR)
+                       print ("^1",s1, "^1 became a shooting star\n");
+               else if (type == DEATH_SWAMP) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 discovered a swamp\n");
+                       else
+                               print ("^1",s1, "^1 is now conserved for centuries to come\n");
+               }
+               else if(type == DEATH_TURRET)
+                       print ("^1",s1, "^1 was mowed down by a turret \n");
+               else if (type == DEATH_CUSTOM)
+                       print ("^1",s1, "^1 ", s2, "\n");
+               else if(type == DEATH_TOUCHEXPLODE)
+                       print ("^1",s1, "^1 died in an accident\n");
+               else if(type == DEATH_CHEAT)
+                       print ("^1",s1, "^1 was unfairly eliminated\n");
+               else if(type == DEATH_FIRE) {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 felt a little hot\n");
+                       else
+                               print ("^1",s1, "^1 burnt to death\n");
+               }
+               else {
+                       if(cvar("cl_gentle"))
+                               print ("^1",s1, "^1 needs a restart\n");
+                       else
+                               print ("^1",s1, "^1 died\n");
+               }
+       } else if(msg == MSG_KILL_ACTION_SPREE) {
+               if(cvar("cl_gentle"))
+                       print ("^1",s1,"^1 needs a restart after a ",s2," scoring spree\n");
+               else
+                       print ("^1",s1,"^1 died with a ",s2," kill spree\n");
+       }
+}
+
+#define DAMAGE_CENTERPRINT_SPACER NEWLINES
+
+void HUD_Centerprint(string s1, float type)
+{
+       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!"));
+               }
+       }
+}
+
 void HUD_Notify (void)
 {
        float id = 4;
@@ -2014,6 +2323,16 @@ void HUD_Notify (void)
                mySize -= '2 2 0' * padding;
        }
 
+       float entries;
+       entries = 4 * mySize_y/mySize_x;
+       float i;
+       for(i = 0; i <= entries; ++i)
+       {
+               drawcolorcodedstring(pos + eY * i * (mySize_y/entries),killnotify_attackers[i], '1 1 0' * (mySize_y/entries), hud_alpha_fg, DRAWFLAG_NORMAL);
+               drawcolorcodedstring(pos + eX * 0.35 * mySize_x + eY * i * (mySize_y/entries),ftos(killnotify_weapons[i]), '1 1 0' * (mySize_y/entries), hud_alpha_fg, DRAWFLAG_NORMAL);
+               drawcolorcodedstring(pos + eX * 0.75 * mySize_x + eY * i * (mySize_y/entries),killnotify_victims[i], '1 1 0' * (mySize_y/entries), hud_alpha_fg, DRAWFLAG_NORMAL);
+       }
+       /* This will come later.
        string s;
        entity tm;
        if(spectatee_status && !intermission)
@@ -2129,6 +2448,7 @@ void HUD_Notify (void)
                        }
                }
        }
+       */
 }
 
 // Timer (#5)
index ed2334bbd79091b882501208179da47397e42512..2215b892abd580f84cf98f7124130de3369f6ebf 100644 (file)
@@ -57,6 +57,7 @@ const float TE_CSQC_VOTE = 108;
 const float TE_CSQC_VOTERESET = 109;
 const float TE_CSQC_ANNOUNCE = 110;
 const float TE_CSQC_TARGET_MUSIC = 111;
+const float TE_CSQC_NOTIFY = 112;
 
 const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
 const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@ -73,6 +74,9 @@ const float RACE_NET_SERVER_RANKINGS = 11;
 const float RACE_NET_SERVER_STATUS = 12;
 const float RANKINGS_CNT = 15;
 
+const float CSQC_KILLNOTIFY = 0;
+const float CSQC_CENTERPRINT = 1;
+
 const float ENT_CLIENT = 0;
 const float ENT_CLIENT_DEAD = 1;
 const float ENT_CLIENT_ENTCS = 2;
@@ -481,6 +485,8 @@ float DEATH_WAKIGUN    = 10040;
 float DEATH_WAKIROCKET = 10041;
 float DEATH_WAKIBLOWUP = 10042;
 
+float DEATH_WEAPON = 10100;
+
 float DEATH_CUSTOM = 10300;
 
 
@@ -516,6 +522,31 @@ float WATERLEVEL_SUBMERGED = 3;
 
 float MAX_SHOT_DISTANCE = 32768;
 
+// CSQC centerprint/notify message types
+float MSG_SUICIDE = 0;
+float MSG_KILL = 1;
+float MSG_SPREE = 2;
+float MSG_KILL_ACTION = 3;
+float MSG_KILL_ACTION_SPREE = 4;
+
+float KILL_TEAM = 0;
+float KILL_TEAM_SPREE = 1;
+float KILL_FIRST_BLOOD = 2;
+float KILL_FIRST_VICTIM = 3;
+float KILL_TYPEFRAG = 4;
+float KILL_TYPEFRAGGED = 5;
+float KILL_FRAG = 6;
+float KILL_FRAGGED = 7;
+float KILL_SPREE = 8;
+float KILL_END_SPREE = 9;
+float KILL_SPREE_3 = 10;
+float KILL_SPREE_5 = 11;
+float KILL_SPREE_10 = 12;
+float KILL_SPREE_15 = 13;
+float KILL_SPREE_20 = 14;
+float KILL_SPREE_25 = 15;
+float KILL_SPREE_30 = 16;
+
 // weapon requests
 float WR_SETUP         = 1; // (SVQC) setup weapon data
 float WR_THINK         = 2; // (SVQC) logic to run every frame
index 505b2e7688a659d890b36faa422a41228ce66c61..14ef6ef2614a1ea77f806b77e9fa9ae3b39194a1 100644 (file)
@@ -245,10 +245,34 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
        GameLogEcho(s);
 }
 
+void Send_KillNotification (string s1, string s2, string s3, float msg, float type)
+{
+       WriteByte(MSG_ALL, SVC_TEMPENTITY);
+       WriteByte(MSG_ALL, TE_CSQC_NOTIFY);
+       WriteByte(MSG_ALL, CSQC_KILLNOTIFY);
+       WriteString(MSG_ALL, s1);
+       WriteString(MSG_ALL, s2);
+       WriteString(MSG_ALL, s3);
+       WriteByte(MSG_ALL, msg);
+       WriteByte(MSG_ALL, type);
+}
+
+// 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)
+{
+       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);
+}
+
 void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 {
-       string  s, a;
-       float p, w;
+       string  s, a, msg;
+       float p, w, type;
 
        if (targ.classname == "player" || targ.classname == "corpse")
        {
@@ -259,8 +283,11 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 
                a = attacker.netname;
 
-               if (targ == attacker)
+               if (targ == attacker) // suicides
                {
+                       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) {
@@ -294,6 +321,11 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                else
                                        centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1You killed your own dumb self!"));
                        }
+                       */
+                       Send_CSQC_Centerprint(targ, msg, deathtype);
+
+                       // TODO: message
+                       /*
                        if(sv_gentle) {
                                if (deathtype == DEATH_CAMP)
                                        bprint ("^1",s, "^1 thought they found a nice camping ground\n");
@@ -310,14 +342,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                if (targ.killcount > 2)
                                        bprint ("^1",s,"^1 faded after a ",ftos(targ.killcount)," point spree\n");
                        } else {
-                               w = DEATH_WEAPONOF(deathtype);
-                               if(WEP_VALID(w))
-                               {
-                                       w_deathtypestring = "couldn't resist the urge to self-destruct";
-                                       w_deathtype = deathtype;
-                                       weapon_action(w, WR_SUICIDEMESSAGE);
-                                       bprint("^1", s, "^1 ", w_deathtypestring, "\n");
-                               }
                                else if (deathtype == DEATH_KILL)
                                        bprint ("^1",s, "^1 couldn't take it anymore\n");
                                else if (deathtype == DEATH_ROT)
@@ -335,27 +359,47 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                else if (deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
                                        bprint ("^1",s, "^1 couldn't resist the urge to self-destruct\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 ended it all after a ",ftos(targ.killcount)," kill spree\n");
                        }
+                       */
+
+                       w = DEATH_WEAPONOF(deathtype);
+                       bprint("deathtype: ", ftos(deathtype), "\n");
+                       if(WEP_VALID(w))
+                       {
+                               msg = ftos(deathtype);
+                               deathtype = DEATH_WEAPON;
+                       }
+
+                       // TODO: wut is this?
+                       // givefrags for logging apparently?
+                       if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
+                       {
+                               LogDeath("suicide", deathtype, targ, targ);
+                               GiveFrags(attacker, targ, -1);
+                       }
+
+                       if (targ.killcount > 2)
+                               msg = ftos(targ.killcount);
+                       Send_KillNotification(s, msg, ftos(w), deathtype, MSG_SUICIDE);
                }
                else if (attacker.classname == "player" || attacker.classname == "gib")
                {
                        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");
@@ -368,9 +412,22 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        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);
+                                       a = s;
+                               }
+                               if (attacker.killcount > 2) {
+                                       msg = ftos(attacker.killcount);
+                                       type = KILL_TEAM_SPREE;
+                               }
+
                                attacker.killcount = 0;
 
                                LogDeath("tk", deathtype, attacker, targ);
+                               Send_CSQC_Centerprint(attacker, s, MSG_KILL);
+                               Send_KillNotification(a, msg, "", type, MSG_KILL);
                        }
                        else
                        {
@@ -378,36 +435,36 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                if (!checkrules_firstblood)
                                {
                                        checkrules_firstblood = TRUE;
-                                       if(sv_gentle)
-                                       {
-                                               bprint("^1",a, "^1 was the first to score", "\n");
-                                               blood_message = "^1First point\n";
-                                               //victim_message = "^1First victim\n";  // or First casualty
-                                       }
-                                       else
-                                       {
-                                               bprint("^1",a, "^1 drew first blood", "\n");
-                                               blood_message = "^1First blood\n";
-                                               victim_message = "^1First victim\n";  // or First casualty
-                                       }
+                                       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
                                }
-                               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(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)));
                                } else {
-                                       if((cvar("sv_fragmessage_information_typefrag")) && (targ.BUTTON_CHAT)) {
-                                               centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^1You typefragged ^7", s, GetAdvancedDeathReports(targ)));
-                                               centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were typefragged by ^7", a, GetAdvancedDeathReports(attacker)));
-                                       } else {
-                                               centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, blood_message, "^4You fragged ^7", s, GetAdvancedDeathReports(targ)));
-                                               centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, victim_message, "^1You were fragged by ^7", a, GetAdvancedDeathReports(attacker)));
-                                       }
-                                       attacker.taunt_soundtime = time + 1;
+                                       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)));
                                }
+                               attacker.taunt_soundtime = time + 1;
 
-                               if(sv_gentle) {
-                                       bprint ("^1",s, "^1 needs a restart thanks to ", a, "\n");
-                               } else {
+                               // 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))
                                        {
@@ -449,6 +506,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        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)
@@ -470,7 +528,20 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                bprint ("^1",s, "^1 ", deathmessage, " by ^1", a, "\n");
                                        else
                                                bprint ("^1",s, "^1 was fragged by ", a, "\n");
-                               }
+                                       */
+
+                                       //w = DEATH_WEAPONOF(deathtype);
+                                       bprint("deathtype: ", ftos(deathtype), "\n");
+                                       if(WEP_VALID(w))
+                                       {
+                                               deathtype = DEATH_WEAPON;
+                                       }
+
+                                       msg = a;
+                                       if (deathtype == DEATH_CUSTOM)
+                                               msg = strcat(deathmessage, " by ^1", msg);
+                                       Send_KillNotification(s, msg, ftos(w), deathtype, MSG_KILL);
+                               //}
 
                                if(g_ctf && targ.flagcarried)
                                {
@@ -482,94 +553,124 @@ 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);
                                }
 
                                LogDeath("frag", deathtype, attacker, targ);
 
                                if (attacker.killcount == 3)
                                {
-                                       if(sv_gentle) {
-                                               bprint (a,"^7 made a ^1TRIPLE SCORE\n");
-                                       } else {
-                                               bprint (a,"^7 made a ^1TRIPLE FRAG\n");
-                                               AnnounceTo(attacker, "03kills");
-                                       }
+                                       //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");
-                                               AnnounceTo(attacker, "05kills");
-                                       }
+                                       //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");
-                                               AnnounceTo(attacker, "10kills");
-                                       }
+                                       //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");
                                }
                        }
                }
                else
                {
-                       centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Watch your step!"));
+                       //centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^1Watch your step!"));
+                       Send_CSQC_Centerprint(targ, "", MSG_KILL_ACTION);
                        if (deathtype == DEATH_HURTTRIGGER && inflictor.message != "")
-                               bprint ("^1",s, "^1 ", inflictor.message, "\n");
-                       else if (deathtype == DEATH_DROWN)
+                               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
@@ -595,8 +696,8 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        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_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)
@@ -611,16 +712,19 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                        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");
                        }
+                       Send_KillNotification(s, msg, "", deathtype, MSG_KILL_ACTION);
 
                        if (targ.killcount > 2)
-                               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");
+                               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);
                }