From: FruitieX Date: Tue, 8 Jun 2010 10:14:42 +0000 (+0300) Subject: d'oh! Write a *SHORT*, not byte >_< X-Git-Tag: xonotic-v0.1.0preview~541^2~104 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=445fe92dce68aeae8fe2c1a50de85af886377256 d'oh! Write a *SHORT*, not byte >_< --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 6609e018dd..3b892ef9b9 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 f2a5a34f31..f31996d67d 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 3b4a73bc9f..55def58fcb 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); }