]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
cleanup headshot handling
authorRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 16:14:08 +0000 (17:14 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 1 Jan 2012 16:14:08 +0000 (17:14 +0100)
qcsrc/client/hud.qc
qcsrc/common/constants.qh

index bf9d7d3a4a6352dbd8cde3b52dbcc8da3ddbe071..a167ef0a433896f83b81c8e1a3f798abdb341a1a 100644 (file)
@@ -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";
index d4d0e3a0d08fb81de101500bcd91c5d9b89f781b..f03a5cf854456d0704c057c688d97f67a2871d05 100644 (file)
@@ -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;