From: Mario Date: Wed, 19 Oct 2016 21:10:44 +0000 (+1000) Subject: Fix intrusive list warning when a monster re-spawns X-Git-Tag: xonotic-v0.8.2~495 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=41513f92cbd4639798cdd8459adbfae4e4cecec8;p=xonotic%2Fxonotic-data.pk3dir.git Fix intrusive list warning when a monster re-spawns --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index fd921a032..59c57fbbe 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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;