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 6609e01..3b892ef 100644 (file)
@@ -1246,7 +1246,7 @@ void Net_Notify() {
 
        if(type == CSQC_KILLNOTIFY)
        {
-               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadByte(), ReadByte());
+               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
        }
        else if(type == CSQC_CENTERPRINT)
        {
index f2a5a34..f31996d 100644 (file)
@@ -2033,11 +2033,11 @@ string Weapon_KillMessage(float deathtype)
                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:
-                       if(id & HITTYPE_BOUNCE)
+                       if(deathtype & HITTYPE_BOUNCE)
                                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)
 {
+       float w;
        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);
@@ -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");
 
-               float w;
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
                        HUD_KillNotify_Push(s1, s2, w);
index 3b4a73b..55def58 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);
 }