From 445fe92dce68aeae8fe2c1a50de85af886377256 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Tue, 8 Jun 2010 13:14:42 +0300 Subject: [PATCH] d'oh! Write a *SHORT*, not byte >_< --- qcsrc/client/Main.qc | 2 +- qcsrc/client/hud.qc | 7 +++---- qcsrc/server/g_damage.qc | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 6609e018d..3b892ef9b 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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) { diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index f2a5a34f3..f31996d67 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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); diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 3b4a73bc9..55def58fc 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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); } -- 2.39.2