From: Mario Date: Mon, 2 Sep 2013 04:55:13 +0000 (+1000) Subject: Don't block if enemy health is lower than 10 X-Git-Tag: xonotic-v0.8.0~241^2^2~87 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0050d782a9871dddda0e55355457e104113039b7;p=xonotic%2Fxonotic-data.pk3dir.git Don't block if enemy health is lower than 10 --- diff --git a/qcsrc/common/monsters/monster/zombie.qc b/qcsrc/common/monsters/monster/zombie.qc index afe5beed0..805fb7bf7 100644 --- a/qcsrc/common/monsters/monster/zombie.qc +++ b/qcsrc/common/monsters/monster/zombie.qc @@ -115,7 +115,7 @@ float zombie_attack(float attack_type) else chosen_anim = zombie_anim_attackstanding3; - if(random() < 0.3 && self.health < 75) + if(random() < 0.3 && self.health < 75 && self.enemy.health > 10) return zombie_block(); return monster_melee(self.enemy, MON_CVAR(zombie, attack_melee_damage), chosen_anim, self.attack_range, MON_CVAR(zombie, attack_melee_delay), DEATH_MONSTER_ZOMBIE_MELEE, TRUE);