From: Mario Date: Sat, 12 Nov 2022 03:26:25 +0000 (+1000) Subject: Remove spawned monsters when the map is reset, fixes #2749 X-Git-Tag: xonotic-v0.8.6~246^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a89c7b6dc6c4ec4d77808a30228eb38fcfd74573;p=xonotic%2Fxonotic-data.pk3dir.git Remove spawned monsters when the map is reset, fixes #2749 --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index fc1681a91..1c8035380 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -884,6 +884,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;