]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
notify messages MOSTLY work... some breakage here and there, please test :/
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 13:20:17 +0000 (16:20 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 13:20:17 +0000 (16:20 +0300)
gfx/hud/wickedhud/notify_pushoffedge.tga [new file with mode: 0644]
gfx/hud/wickedhud/notify_selfkill.tga [new file with mode: 0644]
qcsrc/client/hud.qc
qcsrc/server/g_damage.qc

diff --git a/gfx/hud/wickedhud/notify_pushoffedge.tga b/gfx/hud/wickedhud/notify_pushoffedge.tga
new file mode 100644 (file)
index 0000000..13311ae
Binary files /dev/null and b/gfx/hud/wickedhud/notify_pushoffedge.tga differ
diff --git a/gfx/hud/wickedhud/notify_selfkill.tga b/gfx/hud/wickedhud/notify_selfkill.tga
new file mode 100644 (file)
index 0000000..6d714f9
Binary files /dev/null and b/gfx/hud/wickedhud/notify_selfkill.tga differ
index 8d65a834f97b0a66e5788d57932c5e03be3b54d5..6f4aadffd8f25ccb11ba21407208119394c9f8c6 100644 (file)
@@ -2131,23 +2131,39 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                        print("^1",s1, "^1 drew first blood", "\n");
                else if (type == DEATH_TELEFRAG)
                        print ("^1",s1, "^1 was telefragged by ", s2, "\n");
-               else if (type == DEATH_DROWN)
+               else if (type == DEATH_DROWN) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was drowned by ", s2, "\n");
-               else if (type == DEATH_SLIME)
+               }
+               else if (type == DEATH_SLIME) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was slimed by ", s2, "\n");
-               else if (type == DEATH_LAVA)
+               }
+               else if (type == DEATH_LAVA) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was cooked by ", s2, "\n");
-               else if (type == DEATH_FALL)
+               }
+               else if (type == DEATH_FALL) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was grounded by ", s2, "\n");
-               else if (type == DEATH_SHOOTING_STAR)
+               }
+               else if (type == DEATH_SHOOTING_STAR) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was shot into space by ", s2, "\n");
-               else if (type == DEATH_SWAMP)
+               }
+               else if (type == DEATH_SWAMP) {
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
                        print ("^1",s1, "^1 was conserved by ", s2, "\n");
-               // TODO
-               /*else if (type == DEATH_HURTTRIGGER && inflictor.msg2 != "")
+               }
+               else if (type == DEATH_HURTTRIGGER && s3 != "")
                {
-                       print("^1", s1, "^1 ", s2, "^1", s3, "\n");
-               }*/
+                       HUD_KillNotify_Push(s2, s1, DEATH_FALL);
+                       // p ?!?! :o
+                       //if(p < 0)
+                               print("^1", s1, "^1 ", s3, " ", s2, "\n");
+                       //else
+                       //      bprint("^1", s1, "^1 ", substring(s3, 0, p), s2, "^1", substring(s3, p+1, strlen(s3) - (p+1)), "\n");
+               }
                else if(type == DEATH_SBCRUSH)
                        print ("^1",s1, "^1 was crushed by ^1", s2, "\n");
                else if(type == DEATH_SBMINIGUN)
@@ -2224,6 +2240,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                                print (s1,"^7 unleashes ^1ARMAGEDDON!\n");
                }
        } else if(msg == MSG_KILL_ACTION) { // wtf is this? isnt it basically the same as MSG_SUICIDE?
+               HUD_KillNotify_Push(s1, "", DEATH_KILL);
                if (type == DEATH_DROWN) {
                        if(cvar("cl_gentle"))
                                print ("^1",s1, "^1 was in the water for too long\n");
@@ -2273,6 +2290,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
                                print ("^1",s1, "^1 died\n");
        }
        } else if(msg == MSG_KILL_ACTION_SPREE) {
+               HUD_KillNotify_Push(s1, "", DEATH_KILL);
                if(cvar("cl_gentle"))
                        print ("^1",s1,"^1 needs a restart after a ",s2," scoring spree\n");
                else
@@ -2366,6 +2384,13 @@ void HUD_Notify (void)
                        drawpic_skin(pos + eX * 0.5 * mySize_x - eX * (mySize_y/entries) + eY * i * (mySize_y/entries), strcat("weapon", self.netname), '2 1 0' * (mySize_y/entries), '1 1 1', hud_alpha_fg * a, DRAWFLAG_NORMAL);
                }
                else if(killnotify_deathtype[i] == DEATH_KILL)
+               {
+                       drawpic_skin(pos + eX * 0.5 * mySize_x - eX * (mySize_y/entries) + eY * i * (mySize_y/entries), "notify_selfkill", '2 1 0' * (mySize_y/entries), '1 1 1', hud_alpha_fg * a, DRAWFLAG_NORMAL);   
+               }
+               else if(killnotify_deathtype[i] == DEATH_FALL)
+               {
+                       drawpic_skin(pos + eX * 0.5 * mySize_x - eX * (mySize_y/entries) + eY * i * (mySize_y/entries), "notify_pushoffedge", '2 1 0' * (mySize_y/entries), '1 1 1', hud_alpha_fg * a, DRAWFLAG_NORMAL);        
+               }
        }
        /* This will come later.
        string s;
index 55def58fcbc8ea96581d4b9dbee329711d1d0a9b..538383b4fe6df66e0486d0f7a5cb26d22df5b08a 100644 (file)
@@ -483,14 +483,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                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_HURTTRIGGER && inflictor.message2 != "")
-                                       {
-                                               p = strstrofs(inflictor.message2, "#", 0);
-                                               if(p < 0)
-                                                       bprint("^1", s, "^1 ", inflictor.message2, " ", a, "\n");
-                                               else
-                                                       bprint("^1", s, "^1 ", substring(inflictor.message2, 0, p), a, "^1", substring(inflictor.message2, p+1, strlen(inflictor.message2) - (p+1)), "\n");
-                                       }
                                        else if(deathtype == DEATH_SBCRUSH)
                         bprint ("^1",s, "^1 was crushed by ^1", a, "\n");
                                        else if(deathtype == DEATH_SBMINIGUN)
@@ -526,6 +518,10 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
 
                                        if (deathtype == DEATH_CUSTOM)
                                                msg = strcat(deathmessage, " by ^1", msg);
+                                       else if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
+                                       {
+                                               msg = strstrofs(inflictor.message2, "#", 0);
+                                       }
                                        Send_KillNotification(s, a, msg, deathtype, MSG_KILL);
                                //}