]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't block if enemy health is lower than 10
authorMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 04:55:13 +0000 (14:55 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 04:55:13 +0000 (14:55 +1000)
qcsrc/common/monsters/monster/zombie.qc

index afe5beed0e956eb4a080abd82a7c167f3f8fcfdf..805fb7bf779b9ffee09e7fd6b353a7aef9133bfc 100644 (file)
@@ -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);