]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove spawned monsters when the map is reset, fixes #2749
authorMario <mario.mario@y7mail.com>
Sat, 12 Nov 2022 03:26:25 +0000 (13:26 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 12 Nov 2022 03:26:25 +0000 (13:26 +1000)
qcsrc/common/monsters/sv_monsters.qc

index fc1681a91410065817cabc8570873d299d7b4280..1c80353804135172dd997f2cf5e89f4f027245ce 100644 (file)
@@ -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;