]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix intrusive list warning when a monster re-spawns
authorMario <mario@smbclan.net>
Wed, 19 Oct 2016 21:10:44 +0000 (07:10 +1000)
committerMario <mario@smbclan.net>
Wed, 19 Oct 2016 21:10:44 +0000 (07:10 +1000)
qcsrc/common/monsters/sv_monsters.qc

index fd921a032553f2f606d6d8e904bb0bf7d29a5f16..59c57fbbeb3dd6ceca8ae15f881a7c9cbdc6eb29 100644 (file)
@@ -1319,8 +1319,9 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id)
        this.flags                              = FL_MONSTER;
        this.classname                  = "monster";
        this.takedamage                 = DAMAGE_AIM;
+       if(!this.bot_attack)
+               IL_PUSH(g_bot_targets, this);
        this.bot_attack                 = true;
-       IL_PUSH(g_bot_targets, this);
        this.iscreature                 = true;
        this.teleportable               = true;
        this.damagedbycontents  = true;