Commit b5544a96 authored by Martin Taibr's avatar Martin Taibr

fix overkill blaster damaging turrets and vehicles, remove redundant health check

parent 0410b8a1
Pipeline #5593289 passed with stage
in 12 minutes and 30 seconds
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment