From ad716c050053f31366495924a007d072eb9685f2 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 1 Jan 2012 17:14:08 +0100 Subject: [PATCH] cleanup headshot handling --- qcsrc/client/hud.qc | 14 +++++--------- qcsrc/common/constants.qh | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index bf9d7d3a4..a167ef0a4 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1567,11 +1567,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s } else if(msg == MSG_KILL) { w = DEATH_WEAPONOF(type); if(WEP_VALID(w)) { - if((w == WEP_RIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here - HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT); - else - HUD_KillNotify_Push(s1, s2, 1, type); - + HUD_KillNotify_Push(s1, s2, 1, type); if (alsoprint) print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer } @@ -2245,6 +2241,10 @@ void HUD_Notify (void) { s = "notify_melee_shotgun"; } + else if(killnotify_deathtype[j] & HITTYPE_HEADSHOT && (w == WEP_RIFLE || w == WEP_MINSTANEX)) // all headshot weapons go here + { + s = "notify_headshot"; + } else if(WEP_VALID(w)) { self = get_weaponinfo(w); @@ -2286,10 +2286,6 @@ void HUD_Notify (void) { s = "notify_void"; } - else if(killnotify_deathtype[j] == DEATH_HEADSHOT) - { - s = "notify_headshot"; - } else if(killnotify_deathtype[j] == RACE_SERVER_RECORD) { s = "race_newrecordserver"; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index d4d0e3a0d..f03a5cf85 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -374,7 +374,6 @@ float DEATH_TOUCHEXPLODE = 10015; float DEATH_CHEAT = 10016; float DEATH_FIRE = 10017; float DEATH_QUIET = 10021; -float DEATH_HEADSHOT = 10022; float DEATH_VHFIRST = 10030; float DEATH_VHCRUSH = 10030; -- 2.39.2