]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/sv_monsters.qc
Spawnfuncs: whitelist more fields
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qc
index 0734d54d56943b7e71809c383eaf68e722c2b90e..52e5af984753c8fbcdd43e898ac28165bac80433 100644 (file)
@@ -39,6 +39,7 @@ void monster_dropitem()
 
        vector org = self.origin + ((self.mins + self.maxs) * 0.5);
        entity e = spawn();
+       e.spawnfunc_checked = true;
 
        e.monster_loot = self.monster_loot;
 
@@ -49,7 +50,7 @@ void monster_dropitem()
        {
                setself(e);
                e.noalign = true;
-               e.monster_loot();
+               e.monster_loot(e);
                e.gravity = 1;
                e.movetype = MOVETYPE_TOSS;
                e.reset = SUB_Remove;
@@ -1045,7 +1046,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)