]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix overkill blaster damaging turrets and vehicles, remove redundant health check
authorMartin Taibr <taibr.martin@gmail.com>
Fri, 30 Dec 2016 02:44:49 +0000 (03:44 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Fri, 30 Dec 2016 02:44:49 +0000 (03:44 +0100)
qcsrc/common/mutators/mutator/overkill/sv_overkill.qc

index 8bf9fe4a4f43134f9a9e91f146594887cbfc1bfc..412b5276b061512be1d1511b2d9afbdc4c644f3d 100644 (file)
@@ -98,12 +98,11 @@ MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
        entity frag_target = M_ARGV(2, entity);
        float frag_deathtype = M_ARGV(3, float);
 
-       if(IS_PLAYER(frag_attacker) && IS_PLAYER(frag_target))
+       if(IS_PLAYER(frag_attacker) && (IS_PLAYER(frag_target) || IS_VEHICLE(frag_target) || IS_TURRET(frag_target)))
        if(DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
        {
                if(frag_attacker != frag_target)
-               if(frag_target.health > 0)
-               if(STAT(FROZEN, frag_target) == 0)
+               if(!STAT(FROZEN, frag_target))
                if(!IS_DEAD(frag_target))
                {
                        Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);