]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
d'oh! Write a *SHORT*, not byte >_<
authorFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 10:14:42 +0000 (13:14 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 8 Jun 2010 10:14:42 +0000 (13:14 +0300)
qcsrc/client/Main.qc
qcsrc/client/hud.qc
qcsrc/server/g_damage.qc

index 6609e018dd09e0e4829f5fec88cbc8e034519ea2..3b892ef9b95880e5c8b145ba73f67e279024d6e7 100644 (file)
@@ -1246,7 +1246,7 @@ void Net_Notify() {
 
        if(type == CSQC_KILLNOTIFY)
        {
 
        if(type == CSQC_KILLNOTIFY)
        {
-               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadByte(), ReadByte());
+               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
        }
        else if(type == CSQC_CENTERPRINT)
        {
        }
        else if(type == CSQC_CENTERPRINT)
        {
index f2a5a34f31fec2574e689fde0e6e6fb1bfd6d2e6..f31996d67d12922d47a32e230ab04c1b6bc560e0 100644 (file)
@@ -2033,11 +2033,11 @@ string Weapon_KillMessage(float deathtype)
                case 2:
                        return "was gunned by";
                case 3:
                case 2:
                        return "was gunned by";
                case 3:
-                       if(id & HITTYPE_SECONDARY)
+                       if(deathtype & HITTYPE_SECONDARY)
                                return "was sniped by";
                        return "was riddled full of holes by";
                case 4:
                                return "was sniped by";
                        return "was riddled full of holes by";
                case 4:
-                       if(id & HITTYPE_BOUNCE)
+                       if(deathtype & HITTYPE_BOUNCE)
                                return "didn't see #'s grenade";
                        return "almost dodged #'s grenade";
        }
                                return "didn't see #'s grenade";
                        return "almost dodged #'s grenade";
        }
@@ -2065,12 +2065,12 @@ void HUD_KillNotify_Push(string attacker, string victim, float wpn)
 
 void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
 {
 
 void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
 {
+       float w;
        if(msg == MSG_SUICIDE) {
                // TODO: cl_gentle
                // TODO: way of finding out secondary?
                print("deathtype: ", ftos(type), "\n");
 
        if(msg == MSG_SUICIDE) {
                // TODO: cl_gentle
                // TODO: way of finding out secondary?
                print("deathtype: ", ftos(type), "\n");
 
-               float w;
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
                        HUD_KillNotify_Push(s1, "", w);
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
                        HUD_KillNotify_Push(s1, "", w);
@@ -2098,7 +2098,6 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
        } else if(msg == MSG_KILL) {
                print("deathtype: ", ftos(type), "\n");
 
        } else if(msg == MSG_KILL) {
                print("deathtype: ", ftos(type), "\n");
 
-               float w;
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
                        HUD_KillNotify_Push(s1, s2, w);
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
                        HUD_KillNotify_Push(s1, s2, w);
index 3b4a73bc9faea43518fc67196c824aaef59f0995..55def58fcbc8ea96581d4b9dbee329711d1d0a9b 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);
        WriteString(MSG_ALL, s1);
        WriteString(MSG_ALL, s2);
        WriteString(MSG_ALL, s3);
-       WriteByte(MSG_ALL, msg);
+       WriteShort(MSG_ALL, msg);
        WriteByte(MSG_ALL, type);
 }
 
        WriteByte(MSG_ALL, type);
 }