From: Mario Date: Thu, 28 Jul 2016 12:01:45 +0000 (+1000) Subject: Don't add monster to list again if re-spawning X-Git-Tag: xonotic-v0.8.2~700^2~14 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=13fb448d5fd843188289f311a6ae2838f5afd661;p=xonotic%2Fxonotic-data.pk3dir.git Don't add monster to list again if re-spawning --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 2855ac429..60c2777ca 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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