From: Martin Taibr Date: Fri, 30 Dec 2016 02:44:49 +0000 (+0100) Subject: fix overkill blaster damaging turrets and vehicles, remove redundant health check X-Git-Tag: xonotic-v0.8.2~342^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5544a965e510602dd062e07c5b8c6be688f29c2;p=xonotic%2Fxonotic-data.pk3dir.git fix overkill blaster damaging turrets and vehicles, remove redundant health check --- diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index 8bf9fe4a4..412b5276b 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -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);