]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't add monster to list again if re-spawning
authorMario <mario@smbclan.net>
Thu, 28 Jul 2016 12:01:45 +0000 (22:01 +1000)
committerMario <mario@smbclan.net>
Thu, 28 Jul 2016 12:01:45 +0000 (22:01 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 2855ac4298fccb8db88cbb9a74ad8eee1057ff62..60c2777ca7bd12b5774f953999a0dad99b729687 100644 (file)
@@ -1290,7 +1290,8 @@ bool Monster_Spawn(entity this, int mon_id)
 
        if(!autocvar_g_monsters) { Monster_Remove(this); return false; }
 
-       IL_PUSH(g_monsters, this);
+       if(!(this.spawnflags & MONSTERFLAG_RESPAWNED))
+               IL_PUSH(g_monsters, this);
 
        if(Monster_Appear_Check(this, mon_id)) { return true; } // return true so the monster isn't removed