]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
notify messages MOSTLY work... some breakage here and there, please test :/
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index 1946319403a4cc4038d0a0781620f60b580474f0..538383b4fe6df66e0486d0f7a5cb26d22df5b08a 100644 (file)
@@ -253,7 +253,7 @@ void Send_KillNotification (string s1, string s2, string s3, float msg, float ty
        WriteString(MSG_ALL, s1);
        WriteString(MSG_ALL, s2);
        WriteString(MSG_ALL, s3);
-       WriteByte(MSG_ALL, msg);
+       WriteShort(MSG_ALL, msg);
        WriteByte(MSG_ALL, type);
 }
 
@@ -363,12 +363,6 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                        }
                        */
 
-                       w = DEATH_WEAPONOF(deathtype);
-                       if(!(WEP_VALID(w)))
-                       {
-                               w = -1;
-                       }
-
                        // TODO: wut is this?
                        // givefrags for logging apparently?
                        if(deathtype != DEATH_TEAMCHANGE && deathtype != DEATH_QUIET)
@@ -489,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)
@@ -504,6 +490,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)
@@ -527,16 +514,15 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype)
                                                bprint ("^1",s, "^1 was fragged by ", a, "\n");
                                        */
 
-                                       w = DEATH_WEAPONOF(deathtype);
-                                       if(!(WEP_VALID(w)))
-                                       {
-                                               w = -1;
-                                       }
+                                       //w = DEATH_WEAPONOF(deathtype);
 
-                                       msg = a;
                                        if (deathtype == DEATH_CUSTOM)
                                                msg = strcat(deathmessage, " by ^1", msg);
-                                       Send_KillNotification(s, msg, ftos(w), deathtype, MSG_KILL);
+                                       else if (deathtype == DEATH_HURTTRIGGER && inflictor.message2 != "")
+                                       {
+                                               msg = strstrofs(inflictor.message2, "#", 0);
+                                       }
+                                       Send_KillNotification(s, a, msg, deathtype, MSG_KILL);
                                //}
 
                                if(g_ctf && targ.flagcarried)