Fix crash with Abstinence Program achievement

This commit is contained in:
Steam Deck User 2023-01-12 19:44:00 -05:00
parent 85d723c5e4
commit 5b902d7d6e

View file

@ -436,9 +436,6 @@ void(entity victim,entity attacker, float damage, float d_style) DamageHandler =
if (d_style == S_ZOMBIE && nuke_powerup_active > time)
return;
// Abstinence Program
victim.ach_tracker_abst = 1;
entity old_self;
if (victim.classname == "ai_zombie" || victim.classname == "ai_dog") {
@ -483,6 +480,9 @@ void(entity victim,entity attacker, float damage, float d_style) DamageHandler =
if (victim.flags & FL_GODMODE) {
return;
}
// Abstinence Program
victim.ach_tracker_abst = 1;
if (victim.perks & P_JUG)
damage = ceil(damage*0.5);