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 8bf9fe4..412b527 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);
 
        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(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);
                if(!IS_DEAD(frag_target))
                {
                        Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);