Even invincible monsters should be weak against hurt triggers and lava
authorMario <zacjardine@y7mail.com>
Sat, 3 Oct 2015 07:47:04 +0000 (17:47 +1000)
committerMario <zacjardine@y7mail.com>
Sat, 3 Oct 2015 07:47:04 +0000 (17:47 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 0734d54..64c2644 100644 (file)
@@ -1045,7 +1045,7 @@ void Monster_Dead(entity attacker, float gibbed)
 
 void Monster_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {SELFPARAM();
-       if((self.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL)
+       if((self.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL && !ITEM_DAMAGE_NEEDKILL(deathtype))
                return;
 
        if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)