From 76e77d4e64a597bf53a7d89667cefd20632a6f15 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Aug 2023 09:22:20 +0200 Subject: [PATCH] - Duke: fix enemy counting --- source/games/duke/src/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index c12798ac1..cfb4f7b36 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -492,9 +492,9 @@ void GameInterface::FinalizeSetup() { auto def = static_cast(GetDefaultByType(cls)); auto fb = (SFLAG_BADGUY | SFLAG_KILLCOUNT | SFLAG_BADGUYSTAYPUT); - auto check = (def->flags1 & (SFLAG_BADGUY | SFLAG_KILLCOUNT)); + auto check = (def->flags1 & (SFLAG_INTERNAL_BADGUY | SFLAG_BADGUY | SFLAG_KILLCOUNT)); // do not enable KILLCOUNT if it the base is a non-counting badguy. This is needed for RR's animals. - if (check == EDukeFlags1::FromInt(SFLAG_BADGUY)) fb &= ~SFLAG_KILLCOUNT; + if ((check & (SFLAG_BADGUY | SFLAG_INTERNAL_BADGUY)) && !(check & SFLAG_KILLCOUNT)) fb &= ~SFLAG_KILLCOUNT; def->flags1 = (def->flags1 & ~fb) | (actinf.enemyflags & fb); if (def->flags1 & SFLAG_KILLCOUNT) def->flags1 |= SFLAG_SKILLFILTER; }