From b473a33496d653103ed2b73c13b34de601157eba Mon Sep 17 00:00:00 2001 From: ThomasChr Date: Wed, 13 Oct 2021 20:03:12 +0200 Subject: [PATCH] remove light source when killing a berserk monster --- Source/monster.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/monster.cpp b/Source/monster.cpp index 50165c73b..8279d17bf 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -778,6 +778,11 @@ void LoadDiabMonsts() void DeleteMonster(int i) { + auto monster = Monsters[ActiveMonsters[i]]; + if ((monster._mFlags & MFLAG_BERSERK) != 0) { + AddUnLight(monster.mlid); + } + ActiveMonsterCount--; std::swap(ActiveMonsters[i], ActiveMonsters[ActiveMonsterCount]); // This ensures alive monsters are before ActiveMonsterCount in the array and any deleted monster after }