]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/monsters/sv_monsters.qc
Merge branch 'Mario/minor_fixes' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / monsters / sv_monsters.qc
index e88b35f4554aec593a5a922d09ebf0656e0de33a..1635b5cb0d235c6eeb84dac673c18d98e9421e96 100644 (file)
@@ -55,6 +55,8 @@ void monster_dropitem(entity this, entity attacker)
        {
                e.noalign = true;
                StartItem(e, e.monster_loot);
+               if(startitem_failed || wasfreed(e))
+                       return;
                e.gravity = 1;
                setorigin(e, org);
                e.velocity = randomvec() * 175 + '0 0 325';
@@ -884,6 +886,12 @@ bool Monster_Appear_Check(entity this, Monster monster_id)
 
 void Monster_Reset(entity this)
 {
+       if(this.spawnflags & MONSTERFLAG_SPAWNED)
+       {
+               Monster_Remove(this);
+               return;
+       }
+
        setorigin(this, this.pos1);
        this.angles = this.pos2;